Changeset 14219 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Nov 14, 2008 2:54:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp
r13838 r14219 380 380 } 381 381 382 /* Note that VbglGRCancel *is* now implemented. */ 383 DECLVBGL(void) VBoxHGCMCallbackTimeout (VMMDevHGCMRequestHeader *pHeader, void *pvData, uint32_t u32Data) 384 { 385 PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pvData; 386 LARGE_INTEGER timeout; 387 timeout.QuadPart = u32Data * -10000; /* relative in 100ns units */ 388 dprintf(("VBoxHGCMCallbackTimeout: entering, timeout %llu\n", timeout.QuadPart)); 389 NTSTATUS rc = KeWaitForSingleObject (&pDevExt->keventNotification, Executive, 390 UserMode, 391 FALSE, /* Not Alertable */ 392 &timeout 393 ); 394 dprintf(("VBoxHGCMCallbackTimeout: Wait returned %d fu32Flags=%x\n", rc, pHeader->fu32Flags)); 395 396 if (rc != STATUS_WAIT_0) 397 dprintf(("VBoxHGCMCallbackTimeout: The external event was signalled or the wait timed out or terminated rc = 0x%08X.\n", rc)); 398 else 399 dprintf(("VBoxHGCMCallbackTimeout: fu32Flags = %08X\n", pHeader->fu32Flags)); 400 return; 401 } 402 382 403 NTSTATUS vboxHGCMVerifyIOBuffers (PIO_STACK_LOCATION pStack, unsigned cb) 383 404 { … … 993 1014 { 994 1015 dprintf(("VBOXGUEST_IOCTL_HGCM_CALL: vbox rc = %Rrc\n", rc)); 1016 Status = STATUS_UNSUCCESSFUL; 1017 } 1018 else 1019 { 1020 cbOut = pStack->Parameters.DeviceIoControl.OutputBufferLength; 1021 } 1022 1023 } break; 1024 1025 case VBOXGUEST_IOCTL_HGCM_CALL_TIMEOUT(0): /* (The size isn't relevant on NT.) */ 1026 { 1027 dprintf(("VBoxGuest::VBoxGuestDeviceControl: VBOXGUEST_IOCTL_HGCM_CALL_TIMEOUT\n")); 1028 1029 Status = vboxHGCMVerifyIOBuffers (pStack, 1030 sizeof (VBoxGuestHGCMCallInfoTimeout)); 1031 1032 if (Status != STATUS_SUCCESS) 1033 { 1034 dprintf(("nvalid parameter. Status: %p\n", Status)); 1035 break; 1036 } 1037 1038 VBoxGuestHGCMCallInfoTimeout *pInfo = (VBoxGuestHGCMCallInfoTimeout *)pBuf; 1039 VBoxGuestHGCMCallInfo *ptr = &pInfo->info; 1040 1041 int rc; 1042 if (pInfo->u32Timeout == RT_INDEFINITE_WAIT) 1043 { 1044 dprintf(("VBoxGuest::VBoxGuestDeviceControl: calling VBoxHGCMCall with no timeout\n")); 1045 rc = VbglHGCMCall (ptr, VBoxHGCMCallback, pDevExt, 0); 1046 } 1047 else 1048 { 1049 dprintf(("VBoxGuest::VBoxGuestDeviceControl: calling VBoxHGCMCall timeout %lu ms\n", 1050 pInfo->u32Timeout)); 1051 rc = VbglHGCMCall (ptr, VBoxHGCMCallbackTimeout, pDevExt, pInfo->u32Timeout); 1052 } 1053 1054 if (RT_FAILURE(rc)) 1055 { 1056 dprintf(("VBOXGUEST_IOCTL_HGCM_CALL_TIMEOUT: vbox rc = %Rrc\n", rc)); 995 1057 Status = STATUS_UNSUCCESSFUL; 996 1058 }
Note:
See TracChangeset
for help on using the changeset viewer.