Author: dchapyshev Date: Fri Jan 16 00:44:40 2009 New Revision: 38782
URL: http://svn.reactos.org/svn/reactos?rev=38782&view=rev Log: - Implement RequestDeviceWakeup - Implement CancelDeviceWakeupRequest
Modified: trunk/reactos/dll/win32/kernel32/misc/power.c
Modified: trunk/reactos/dll/win32/kernel32/misc/power.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/pow... ============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/power.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/power.c [iso-8859-1] Fri Jan 16 00:44:40 2009 @@ -54,6 +54,20 @@ IN BOOLEAN Asynchronous );
+NTSYSAPI +NTSTATUS +NTAPI +NtRequestDeviceWakeup( + IN HANDLE Device +); + +NTSYSAPI +NTSTATUS +NTAPI +NtCancelDeviceWakeupRequest( + IN HANDLE Device +); + /* PUBLIC FUNCTIONS ***********************************************************/
/* @@ -167,15 +181,23 @@ }
/* - * @unimplemented + * @implemented */ BOOL WINAPI RequestDeviceWakeup(HANDLE hDevice) { - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - DPRINT1("RequestDeviceWakeup is UNIMPLEMENTED!\n"); - return 0; + NTSTATUS Status; + + Status = NtRequestDeviceWakeup(hDevice); + + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return FALSE; + } + + return TRUE; }
/* @@ -199,19 +221,27 @@ }
/* - * @unimplemented + * @implemented */ BOOL WINAPI CancelDeviceWakeupRequest(HANDLE hDevice) { - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - DPRINT1("CancelDeviceWakeupRequest is UNIMPLEMENTED!\n"); - return 0; -} - -/* - * @unimplemented + NTSTATUS Status; + + Status = NtCancelDeviceWakeupRequest(hDevice); + + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return FALSE; + } + + return TRUE; +} + +/* + * @implemented */ BOOL WINAPI