Changeset 70282 in vbox for trunk/src/VBox
- Timestamp:
- Dec 21, 2017 2:28:47 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp
r70280 r70282 94 94 /** Top of the stack. */ 95 95 PDEVICE_OBJECT pNextLowerDriver; 96 97 /** @name PCI bus and slot (device+function) set by for legacy NT only. 98 * @{ */ 99 /** Bus number where the device is located. */ 100 ULONG uBus; 101 /** Slot number where the device is located (PCI_SLOT_NUMBER). */ 102 ULONG uSlot; 103 /** @} */ 104 105 /** @name Interrupt stuff. 106 * @{ */ 96 107 /** Interrupt object pointer. */ 97 108 PKINTERRUPT pInterruptObject; 98 99 /** Bus number where the device is located. */100 ULONG uBus;101 /** Slot number where the device is located. */102 ULONG uSlot;103 109 /** Device interrupt level. */ 104 110 ULONG uInterruptLevel; … … 109 115 /** LevelSensitive or Latched. */ 110 116 KINTERRUPT_MODE enmInterruptMode; 117 /** @} */ 111 118 112 119 /** Physical address and length of VMMDev memory. */ … … 116 123 117 124 /** Device state. */ 118 VGDRVNTDEVSTATE 125 VGDRVNTDEVSTATE volatile enmDevState; 119 126 /** The previous device state. */ 120 127 VGDRVNTDEVSTATE enmPrevDevState; … … 1196 1203 1197 1204 /** 1205 * Checks if the device is idle. 1206 * @returns STATUS_SUCCESS if idle, STATUS_UNSUCCESSFUL if busy. 1207 * @param pDevExt The device extension. 1208 * @param pszQueryNm The query name. 1209 */ 1210 static NTSTATUS vgdrvNtCheckIdle(PVBOXGUESTDEVEXTWIN pDevExt, const char *pszQueryNm) 1211 { 1212 uint32_t cSessions = pDevExt->Core.cSessions; 1213 if (cSessions == 0) 1214 return STATUS_SUCCESS; 1215 LogRel(("vgdrvNtCheckIdle/%s: cSessions=%d\n", pszQueryNm, cSessions)); 1216 return STATUS_UNSUCCESSFUL; 1217 } 1218 1219 1220 /** 1198 1221 * PnP Request handler. 1199 1222 * … … 1286 1309 rc = STATUS_UNSUCCESSFUL; 1287 1310 #endif 1288 /** @todo refuse to remove ourselves when we've got client 1289 * sessions attached... */ 1290 1311 if (NT_SUCCESS(rc)) 1312 rc = vgdrvNtCheckIdle(pDevExt, "QUERY_REMOVE_DEVICE"); 1291 1313 if (NT_SUCCESS(rc)) 1292 1314 { … … 1403 1425 { 1404 1426 Log(("vgdrvNtNt5PlusPnP: QUERY_STOP_DEVICE\n")); 1405 1406 /** @todo Check whether we can stop the device. Similar to 1407 * removal above */ 1408 rc = STATUS_SUCCESS; 1427 VGDRVNTDEVSTATE const enmOldState = pDevExt->enmDevState; 1428 rc = vgdrvNtCheckIdle(pDevExt, "QUERY_STOP_DEVICE"); 1409 1429 if (NT_SUCCESS(rc)) 1410 1430 { … … 2224 2244 * Implements RTL_QUERY_REGISTRY_ROUTINE for enumerating our registry key. 2225 2245 */ 2226 static NTSTATUS NTAPI v bdrvNtRegistryEnumCallback(PWSTR pwszValueName, ULONG uValueType,2246 static NTSTATUS NTAPI vgdrvNtRegistryEnumCallback(PWSTR pwszValueName, ULONG uValueType, 2227 2247 PVOID pvValue, ULONG cbValue, PVOID pvUser, PVOID pvEntryCtx) 2228 2248 { … … 2356 2376 RTL_QUERY_REGISTRY_TABLE aQuery[2]; 2357 2377 RT_ZERO(aQuery); 2358 aQuery[0].QueryRoutine = v bdrvNtRegistryEnumCallback;2378 aQuery[0].QueryRoutine = vgdrvNtRegistryEnumCallback; 2359 2379 aQuery[0].Flags = 0; 2360 2380 aQuery[0].Name = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.