HalpSetAcpiRealTimeClock
NTSTATUS __stdcall HalpSetAcpiRealTimeClock(ACPI_REAL_TIME *AcpiRealTime){
_DEVICE_OBJECT *DynamicDevicePointer;
NTSTATUS Status;
IRP *v4;
struct _IO_STATUS_BLOCK IoStatusBlock;
struct _KEVENT Event;
memset(&Event, 0, sizeof(Event));
IoStatusBlock = 0i64;
DynamicDevicePointer = (_DEVICE_OBJECT *)HalpGetDynamicDevicePointer();
if( !DynamicDevicePointer )
return -1073741823;
KeInitializeEvent(&Event, NotificationEvent, 0);
v4 = IoBuildDeviceIoControlRequest(
0x298214u,
DynamicDevicePointer,
AcpiRealTime,
0x10u,
0i64,
0,
0,
&Event,
&IoStatusBlock);
if( v4 )
{
Status = IofCallDriver(DynamicDevicePointer, v4);
if( Status == 259 )
{
KeWaitForSingleObject(&Event, Executive, 0, 0, 0i64);
Status = IoStatusBlock.Status;
}
}
else
{
Status = -1073741670;
}
HalPutDmaAdapter((PADAPTER_OBJECT)DynamicDevicePointer);
return Status;
}Referenced by:
HalSetRealTimeClock