Documented ddmg api that been implement

svn path=/trunk/; revision=31516
This commit is contained in:
Magnus Olsen 2007-12-31 14:31:06 +00:00
parent ad4f47ec96
commit 0370130854
3 changed files with 62 additions and 2 deletions

View file

@ -31,6 +31,19 @@ VerifyObjectOwner(PDD_ENTRY pEntry)
return ( (check == Pid) || (!check));
}
/*++
* @name DdHmgCreate
* @implemented
*
* The function DdHmgCreate is internal use in dxg.sys
* It Create all DX kernel object that is need it, for create DX object.
*
* @return
* return FALSE for fail, return TRUE for sussess create DX object
*
* @remarks.
* Only use internal in dxg.sys
*--*/
BOOL
FASTCALL
DdHmgCreate()
@ -64,6 +77,19 @@ DdHmgCreate()
return FALSE;
}
/*++
* @name DdHmgDestroy
* @implemented
*
* The function DdHmgDestroy is internal use in dxg.sys
* It destore all DX kernel object
*
* @return
* return FALSE for fail or noting to destore, return TRUE for sussess destore all dx object
*
* @remarks.
* Only use internal in dxg.sys
*--*/
BOOL
FASTCALL
DdHmgDestroy()
@ -88,6 +114,34 @@ DdHmgDestroy()
return TRUE;
}
/*++
* @name DdHmgLock
* @implemented
*
* The function DdHmgLock is internal use in dxg.sys
* it lock a Dx kernel object
*
* @param HANDLE DdHandle
* The handle we want lock
*
* @param UCHAR ObjectType
* The type of the object we expected the handle contain
* value 0 is for getting ?
* value 1 is for getting EDD_DIRECTDRAW_LOCAL
* value 2 is for getting EDD_SURFACE
* value 3 is for getting ?
* value 4 is for getting EDD_VIDEOPORT
* value 5 is for getting EDD_MOTIONCOMP
* @param BOOLEAN LockOwned
* if it need be EngAcquireSemaphore or not
*
* @return
* return a EDD_* object, or NULL depnes if it success or not.
*
* @remarks.
* Only use internal in dxg.sys
*--*/
PVOID
FASTCALL
DdHmgLock( HANDLE DdHandle, UCHAR ObjectType, BOOLEAN LockOwned)

View file

@ -31,7 +31,9 @@
#include "tags.h"
#define ObjType_DDSURFACE_TYPE 2
#define ObjType_DDVIDEOPORT_TYPE 4
#define ObjType_DDMOTIONCOMP_TYPE 5
typedef struct _DD_ENTRY
{

View file

@ -19,7 +19,7 @@ DxDdLockDirectDrawSurface(HANDLE hDdSurface)
PEDD_SURFACE pEDDSurface = NULL;
PDD_SURFACE_LOCAL pSurfacelcl = NULL;
pEDDSurface = DdHmgLock(hDdSurface, 2, FALSE);
pEDDSurface = DdHmgLock(hDdSurface, ObjType_DDSURFACE_TYPE, FALSE);
if (pEDDSurface != NULL)
{
pSurfacelcl = &pEDDSurface->ddsSurfaceLocal;
@ -48,3 +48,7 @@ DxDdUnlockDirectDrawSurface(PDD_SURFACE_LOCAL pSurface)