Changeset 3105 in vbox for trunk/src/VBox/Additions/common/VBoxGuestLib
- Timestamp:
- Jun 14, 2007 11:18:15 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/SysHlp.cpp
r3090 r3105 143 143 IO_STATUS_BLOCK ioStatusBlock; 144 144 145 KEVENT *pEvent; 146 #ifdef KEVENT_STACK_ALLOC 147 KEVENT eventAlloc; 148 pEvent = &eventAlloc; 149 #else 150 pEvent = (KEVENT *)ExAllocatePool (NonPagedPool, sizeof (KEVENT)); 151 if (!pEvent) return VERR_NO_MEMORY; 152 #endif /* KEVENT_STACK_ALLOC */ 153 KeInitializeEvent (pEvent, NotificationEvent, FALSE); 145 KEVENT Event; 146 KeInitializeEvent (&Event, NotificationEvent, FALSE); 154 147 155 148 PIRP irp = IoBuildDeviceIoControlRequest (u32Function, … … 159 152 pvData, 160 153 cbData, 161 FALSE, 162 pEvent,154 FALSE, /* external */ 155 &Event, 163 156 &ioStatusBlock); 164 157 if (irp == NULL) 165 158 { 166 159 Log(("vbglDriverIOCtl: IoBuildDeviceIoControlRequest failed\n")); 167 #ifndef KEVENT_STACK_ALLOC168 ExFreePool (pEvent);169 #endif /* KEVENT_STACK_ALLOC */170 160 return VERR_NO_MEMORY; 171 161 } … … 176 166 { 177 167 Log(("vbglDriverIOCtl: STATUS_PENDING\n")); 178 rc = KeWaitForSingleObject( pEvent,168 rc = KeWaitForSingleObject(&Event, 179 169 Executive, 180 170 KernelMode, … … 187 177 if (!NT_SUCCESS(rc)) 188 178 Log(("vbglDriverIOCtl: IoCallDriver failed with ntstatus=%x\n", rc)); 189 190 #ifndef KEVENT_STACK_ALLOC191 ExFreePool (pEvent);192 #endif /* KEVENT_STACK_ALLOC */193 179 194 180 return NT_SUCCESS(rc)? VINF_SUCCESS: VERR_VBGL_IOCTL_FAILED;
Note:
See TracChangeset
for help on using the changeset viewer.