Fix up comment about replacement for ->Reserved
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
ae6e72a39e
commit
33cac1114c
9
wintun.c
9
wintun.c
@ -1197,12 +1197,15 @@ TunInitializeEx(
|
|||||||
status = NDIS_STATUS_FAILURE;
|
status = NDIS_STATUS_FAILURE;
|
||||||
goto cleanup_NdisDeregisterDeviceEx;
|
goto cleanup_NdisDeregisterDeviceEx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Jason reverse engineered and found NdisWdfGetAdapterContextFromAdapterHandle.
|
|
||||||
* Switch from device object's "Reserved" to this when we drop support for Windows 8.1. */
|
|
||||||
DEVICE_OBJECT *functional_device;
|
DEVICE_OBJECT *functional_device;
|
||||||
NdisMGetDeviceProperty(MiniportAdapterHandle, NULL, &functional_device, NULL, NULL, NULL);
|
NdisMGetDeviceProperty(MiniportAdapterHandle, NULL, &functional_device, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
/* Reverse engineering indicates that we'd be better off calling
|
||||||
|
* NdisWdfGetAdapterContextFromAdapterHandle(functional_device),
|
||||||
|
* which points to our TUN_CTX object directly, but this isn't
|
||||||
|
* available before Windows 10, so for now we just stick it into
|
||||||
|
* this reserved field. Revisit this when we drop support for old
|
||||||
|
* Windows versions. */
|
||||||
#pragma warning(suppress : 28175)
|
#pragma warning(suppress : 28175)
|
||||||
ASSERT(!functional_device->Reserved);
|
ASSERT(!functional_device->Reserved);
|
||||||
#pragma warning(suppress : 28175)
|
#pragma warning(suppress : 28175)
|
||||||
|
Loading…
Reference in New Issue
Block a user