Update the documentation

adding lite more code 

svn path=/branches/reactx/; revision=30301
This commit is contained in:
Magnus Olsen 2007-11-09 17:33:02 +00:00
parent 7e69094a29
commit d05c0eadf6
2 changed files with 41 additions and 25 deletions

View file

@ -20,17 +20,16 @@ KsiCreateObjectType( HANDLE hHandle,
/*++ /*++
* @name KsCreateAllocator * @name KsCreateAllocator
* @implemented * @implemented
* The function KsCreateAllocator creates a handle to an allocator for the given sink connection handle
* *
* The function KsCreateAllocator * @param HANDLE ConnectionHandle
* Handle to the sink connection on which to create the allocator
* *
* @param * @param PKSALLOCATOR_FRAMING AllocatorFraming
* the input param we using to alloc our framing
* *
* @param * @param PHANDLE AllocatorHandle
* * Our new handle that we have alloc
* @param ACCESS_MASK DesiredAccess
* Desrided access
*
* @param
* *
* @return * @return
* Return NTSTATUS error code or sussess code. * Return NTSTATUS error code or sussess code.
@ -59,16 +58,16 @@ KsCreateAllocator(HANDLE ConnectionHandle,
* @name KsCreateClock * @name KsCreateClock
* @implemented * @implemented
* *
* The function KsCreateClock * The function KsCreateClock creates handle to clock instance
* *
* @param * @param HANDLE ConnectionHandle
* Handle to use to create the clock
* *
* @param * @param PKSCLOCK_CREATE ClockCreate
* paramenter to use to create the clock
* *
* @param ACCESS_MASK DesiredAccess * @param PHANDLE ClockHandle
* Desrided access * The new handle
*
* @param
* *
* @return * @return
* Return NTSTATUS error code or sussess code. * Return NTSTATUS error code or sussess code.
@ -92,42 +91,58 @@ KsCreateClock(HANDLE ConnectionHandle,
ClockHandle); ClockHandle);
} }
/*++ /*++
* @name KsCreatePin * @name KsCreatePin
* @implemented * @implemented
* *
* The function KsCreatePin * The function KsCreatePin passes a connection request to device and create pin instance
* *
* @param * @param HANDLE FilterHandle
* * handle of the filter initiating the create request
* @param
* *
* @param PKSPIN_CONNECT Connect
* Pointer to a KSPIN_CONNECT structure that contains parameters for the requested connection.
* This should be followed in memory by a KSDATAFORMAT data structure, describing the data format
* requested for the connection.
* @param ACCESS_MASK DesiredAccess * @param ACCESS_MASK DesiredAccess
* Desrided access * Desrided access
* *
* @param * @param PHANDLE ConnectionHandle
* connection handle passed
* *
* @return * @return
* Return NTSTATUS error code or sussess code. * Return NTSTATUS error code or sussess code.
* *
* @remarks. * @remarks.
* none * The flag in PKSDATAFORMAT is not really document,
* to find it u need api mointor allot api and figout
* how it works, only flag I have found is the
* KSDATAFORMAT_ATTRIBUTES flag, it doing a Align
* of LONLONG size, it also round up it.
* *
*--*/ *--*/
KSDDKAPI KSDDKAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
KsCreatePin(HANDLE FilterHandle, KsCreatePin(HANDLE FilterHandle,
PKSPIN_CONNECT Connect, PKSPIN_CONNECT Connect,
ACCESS_MASK DesiredAccess, ACCESS_MASK DesiredAccess,
OUT PHANDLE ConnectionHandle) PHANDLE ConnectionHandle)
{ {
ULONG BufferSize = sizeof(KSPIN_CONNECT);
PKSDATAFORMAT DataFormat = ((PKSDATAFORMAT) ( ((ULONG)Connect) + ((ULONG)sizeof(KSPIN_CONNECT)) ) );
if (DataFormat->Flags & KSDATAFORMAT_ATTRIBUTES)
{
BufferSize += (ROUND_UP(DataFormat->FormatSize,sizeof(LONGLONG)) + DataFormat->FormatSize);
}
return KsiCreateObjectType(FilterHandle, return KsiCreateObjectType(FilterHandle,
KSSTRING_Pin, KSSTRING_Pin,
Connect, Connect,
sizeof(KSPIN_CONNECT), BufferSize,
DesiredAccess, DesiredAccess,
ConnectionHandle); ConnectionHandle);

View file

@ -3,6 +3,7 @@
#define _KSDDK_ #define _KSDDK_
#include <windows.h> #include <windows.h>
#include <reactos/helper.h>
#ifndef NTSTATUS #ifndef NTSTATUS
#define NTSTATUS DWORD #define NTSTATUS DWORD