Author: greatlrd
Date: Wed Mar 5 00:35:01 2008
New Revision: 32564
URL:
http://svn.reactos.org/svn/reactos?rev=3D32564&view=3Drev
Log:
Implemented : DxEngLockHdev, DxEngUnlockHdev =
Thanks jimtabor for the help with these two. =
Modified:
trunk/reactos/include/reactos/drivers/directx/dxeng.h
trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c
Modified: trunk/reactos/include/reactos/drivers/directx/dxeng.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/drive=
rs/directx/dxeng.h?rev=3D32564&r1=3D32563&r2=3D32564&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/include/reactos/drivers/directx/dxeng.h (original)
+++ trunk/reactos/include/reactos/drivers/directx/dxeng.h Wed Mar 5 00:35:=
01 2008
@@ -87,14 +87,15 @@
DWORD DxEngGetHdevData(HDEV, DXEGSHDEVDATA);
BOOLEAN DxEngSetHdevData(HDEV, DXEGSHDEVDATA, DWORD);
BOOLEAN DxEngIncDispUniq();
+BOOLEAN DxEngLockHdev(HDEV hdev);
+BOOLEAN DxEngUnlockHdev(HDEV hdev);
=
/* prototypes are not done yet, I need gather all my notes
* to make them correct
*/
DWORD DxEngCreateMemoryDC(DWORD x1);
DWORD DxEngScreenAccessCheck();
-DWORD DxEngLockHdev(DWORD x1);
-DWORD DxEngUnlockHdev(DWORD x1);
+
DWORD DxEngReferenceHdev(DWORD x1);
DWORD DxEngIsHdevLockedByCurrentThread(DWORD x1);
DWORD DxEngUnreferenceHdev(DWORD x1);
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win3=
2k/ntddraw/dxeng.c?rev=3D32564&r1=3D32563&r2=3D32564&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c Wed Mar 5 00:35:=
01 2008
@@ -465,6 +465,67 @@
return TRUE;
}
=
+/*++
+* @name DxEngLockHdev
+* @implemented
+*
+* The function DxEngLockHdev lock the internal PDEV
+*
+* @param HDEV type
+* it is a pointer to win32k internal pdev struct known as PGDIDEVICE
+
+* @return
+* This function returns TRUE no matter what.
+*
+* @remarks.
+* none
+*
+*--*/
+BOOLEAN =
+DxEngLockHdev(HDEV hDev)
+{
+ PGDIDEVICE pPDev =3D (PGDIDEVICE)hDev;
+ PERESOURCE Resource =3D pPDev->hsemDevLock;
+
+ if (Resource)
+ {
+ KeEnterCriticalRegion();
+ ExAcquireResourceExclusiveLite( Resource , TRUE); // Lock monitor.
+ }
+ return TRUE;
+}
+
+/*++
+* @name DxEngUnlockHdev
+* @implemented
+*
+* The function DxEngUnlockHdev unlock the internal PDEV
+*
+* @param HDEV type
+* it is a pointer to win32k internal pdev struct known as PGDIDEVICE
+
+* @return
+* This function returns TRUE no matter what.
+*
+* @remarks.
+* none
+*
+*--*/
+BOOLEAN =
+DxEngUnlockHdev(HDEV hDev)
+{
+ PGDIDEVICE pPDev =3D (PGDIDEVICE)hDev;
+ PERESOURCE Resource =3D pPDev->hsemDevLock;
+
+ if (Resource)
+ {
+ ExReleaseResourceLite( Resource );
+ KeLeaveCriticalRegion();
+ }
+ return TRUE;
+}
+
+
/************************************************************************/
/* DxEngNUIsTermSrv */
/************************************************************************/
@@ -532,23 +593,7 @@
return FALSE;
}
=
-/************************************************************************/
-/* DxEngLockHdev */
-/************************************************************************/
-DWORD DxEngLockHdev(DWORD x1)
-{
- UNIMPLEMENTED;
- return FALSE;
-}
-
-/************************************************************************/
-/* DxEngUnlockHdev */
-/************************************************************************/
-DWORD DxEngUnlockHdev(DWORD x1)
-{
- UNIMPLEMENTED;
- return FALSE;
-}
+
=
/************************************************************************/
/* DxEngReferenceHdev */