Author: greatlrd
Date: Mon Dec 31 17:31:06 2007
New Revision: 31516
URL: http://svn.reactos.org/svn/reactos?rev=31516&view=rev
Log:
Documented ddmg api that been implement
Modified:
trunk/reactos/drivers/directx/dxg/ddhmg.c
trunk/reactos/drivers/directx/dxg/dxg_int.h
trunk/reactos/drivers/directx/dxg/eng.c
Modified: trunk/reactos/drivers/directx/dxg/ddhmg.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxg/ddhmg.…
==============================================================================
--- trunk/reactos/drivers/directx/dxg/ddhmg.c (original)
+++ trunk/reactos/drivers/directx/dxg/ddhmg.c Mon Dec 31 17:31:06 2007
@@ -31,6 +31,19 @@
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 @@
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 @@
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)
Modified: trunk/reactos/drivers/directx/dxg/dxg_int.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxg/dxg_in…
==============================================================================
--- trunk/reactos/drivers/directx/dxg/dxg_int.h (original)
+++ trunk/reactos/drivers/directx/dxg/dxg_int.h Mon Dec 31 17:31:06 2007
@@ -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
{
Modified: trunk/reactos/drivers/directx/dxg/eng.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxg/eng.c?…
==============================================================================
--- trunk/reactos/drivers/directx/dxg/eng.c (original)
+++ trunk/reactos/drivers/directx/dxg/eng.c Mon Dec 31 17:31:06 2007
@@ -19,7 +19,7 @@
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 @@
+
+
+
+