Author: greatlrd
Date: Fri Nov 9 18:08:44 2007
New Revision: 30295
URL:
http://svn.reactos.org/svn/reactos?rev=30295&view=rev
Log:
Implement KsCreateAllocator, KsCreateClock, KsCreatePin, KsCreateTopologyNode
stub : KsiCreateObjectType
all functions are call to KsiCreateObjectType, so they are not really implement.
Old code from 2004, it have not been cleanup for KsiCreateObjectType, the new ks.h header
I wrote is now ready for this code.
This module can not be merge to trunk until the new ks.h is ready.
Modified:
branches/reactx/reactos/dll/directx/ksuser/ksuser.c
branches/reactx/reactos/dll/directx/ksuser/ksuser.h
Modified: branches/reactx/reactos/dll/directx/ksuser/ksuser.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ksus…
==============================================================================
--- branches/reactx/reactos/dll/directx/ksuser/ksuser.c (original)
+++ branches/reactx/reactos/dll/directx/ksuser/ksuser.c Fri Nov 9 18:08:44 2007
@@ -1,27 +1,82 @@
-#define _KSDDK_
-#include <windows.h>
-#include <ks.h>
#include "ksuser.h"
-#include <debug.h>
+NTSTATUS NTAPI KsiCreateObjectType( HANDLE hHandle, PVOID guidstr, PVOID Buffer, ULONG
BufferSize, ACCESS_MASK DesiredAccess, PHANDLE phHandle);
+NTSTATUS
+NTAPI
+KsiCreateObjectType( HANDLE hHandle,
+ PVOID IID,
+ PVOID Buffer,
+ ULONG BufferSize,
+ ACCESS_MASK DesiredAccess,
+ PHANDLE phHandle)
+{
+ UNIMPLEMENTED
+ return 0;
+}
-
-
+/*++
+* @name KsCreateAllocator
+* @implemented
+*
+* The function KsCreateAllocator
+*
+* @param
+*
+* @param
+*
+* @param ACCESS_MASK DesiredAccess
+* Desrided access
+*
+* @param
+*
+* @return
+* Return NTSTATUS error code or sussess code.
+*
+* @remarks.
+* none
+*
+*--*/
KSDDKAPI
NTSTATUS
NTAPI
KsCreateAllocator(HANDLE ConnectionHandle,
PKSALLOCATOR_FRAMING AllocatorFraming,
PHANDLE AllocatorHandle)
+
{
-
- return 0;
+ return KsiCreateObjectType( ConnectionHandle,
+ KSSTRING_Allocator,
+ (PVOID) AllocatorFraming,
+ sizeof(KSALLOCATOR_FRAMING),
+ GENERIC_READ,
+ AllocatorHandle);
}
-/*
+/*++
+* @name KsCreateClock
+* @implemented
+*
+* The function KsCreateClock
+*
+* @param
+*
+* @param
+*
+* @param ACCESS_MASK DesiredAccess
+* Desrided access
+*
+* @param
+*
+* @return
+* Return NTSTATUS error code or sussess code.
+*
+* @remarks.
+* none
+*
+*--*/
KSDDKAPI
NTSTATUS
NTAPI
@@ -29,10 +84,38 @@
PKSCLOCK_CREATE ClockCreate,
PHANDLE ClockHandle)
{
- UNIMPLEMENTED
- return 0;
+ return KsiCreateObjectType( ConnectionHandle,
+ KSSTRING_Clock,
+ (PVOID) ClockCreate,
+ sizeof(KSCLOCK_CREATE),
+ GENERIC_READ,
+ ClockHandle);
}
+
+
+/*++
+* @name KsCreatePin
+* @implemented
+*
+* The function KsCreatePin
+*
+* @param
+*
+* @param
+*
+* @param ACCESS_MASK DesiredAccess
+* Desrided access
+*
+* @param
+*
+* @return
+* Return NTSTATUS error code or sussess code.
+*
+* @remarks.
+* none
+*
+*--*/
KSDDKAPI
NTSTATUS
NTAPI
@@ -41,10 +124,41 @@
ACCESS_MASK DesiredAccess,
OUT PHANDLE ConnectionHandle)
{
- UNIMPLEMENTED
- return 0;
+ return KsiCreateObjectType(FilterHandle,
+ KSSTRING_Pin,
+ Connect,
+ sizeof(KSPIN_CONNECT),
+ DesiredAccess,
+ ConnectionHandle);
+
}
+/*++
+* @name KsCreateTopologyNode
+* @implemented
+*
+* The function KsCreateTopologyNode creates a handle to a topology node instance
+*
+* @param HANDLE ParentHandle
+* Handle to parent when want to use when we created the node on
+*
+*
+* @param PKSNODE_CREATE NodeCreate
+* topology node parameters to use when it is create
+*
+* @param ACCESS_MASK DesiredAccess
+* Desrided access
+*
+* @param PHANDLE NodeHandle
+* Location for the topology node handle
+*
+* @return
+* Return NTSTATUS error code or sussess code.
+*
+* @remarks.
+* none
+*
+*--*/
KSDDKAPI
NTSTATUS
NTAPI
@@ -53,10 +167,14 @@
IN ACCESS_MASK DesiredAccess,
OUT PHANDLE NodeHandle)
{
- UNIMPLEMENTED
- return 0;
+ return KsiCreateObjectType( ParentHandle,
+ KSSTRING_TopologyNode,
+ (PVOID) NodeCreate,
+ sizeof(KSNODE_CREATE),
+ DesiredAccess,
+ NodeHandle);
}
-*/
+
BOOL
APIENTRY
Modified: branches/reactx/reactos/dll/directx/ksuser/ksuser.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ksus…
==============================================================================
--- branches/reactx/reactos/dll/directx/ksuser/ksuser.h (original)
+++ branches/reactx/reactos/dll/directx/ksuser/ksuser.h Fri Nov 9 18:08:44 2007
@@ -1,3 +1,16 @@
+
+
+
+#define _KSDDK_
#include <windows.h>
+#ifndef NTSTATUS
+ #define NTSTATUS DWORD
+#endif
+#include <ks.h>
+#include <debug.h>
+
+
+
+