// ndis.h
NDIS_STATUS NdisGetHypervisorInfo(
[in, out] PNDIS_HYPERVISOR_INFO HypervisorInfo
);
View the official Windows Driver Kit DDI referenceNo description available.
Important
Starting with Windows 10 Version 1703, NdisGetHypervisorInfo is deprecated and should not be used. Drivers are encouraged to move away from it, as it may not be available in future versions of the operating system.
Drivers should instead follow a hypervisor's instructions to query hypervisor presence and capabilities. For example, Hyper-V's instructions are documented in the Top-Level Functional Specification.
The NdisGetHypervisorInfo function returns information about the hypervisor that is present on the system.
HypervisorInfo [in, out]A pointer to a caller-allocated NDIS_HYPERVISOR_INFO structure that contains information about the hypervisor that is present on the system.
NdisGetHypervisorInfo can return one of the following status values:
| Return code | Description |
|---|---|
| NDIS_STATUS_SUCCESS | The operation completed successfully. |
| NDIS_STATUS_BUFFER_TOO_SHORT | The size of the input parameter buffer was too small. |
NDIS miniport drivers call the NdisGetHypervisorInfo function to determine whether a hypervisor is present on the system.
When the NdisGetHypervisorInfo function returns, the HypervisorInfo parameter contains a pointer to an NDIS_HYPERVISOR_INFO structure. This structure contains information about whether a hypervisor is present, along with the partition type from which this function was called. The NDIS_HYPERVISOR_INFO structure provides this information in the following way:
If the Microsoft hypervisor is present, the PartitionType member is set to one of the following values:
Note A driver must initialize the Header member of the NDIS_HYPERVISOR_INFO structure before it calls the NdisGetHypervisorInfo function.