include vmm.inc GetVxDServiceOrdinal reg, ServiceName #include <vmm.h> DWORD dwServiceOrdinal = GetVxDServiceOrdinal(ServiceName);
Obtains the virtual device service ordinal, for use by Hook_Device_Service.
reg
Register to receive the virtual device service ordinal.
ServiceName
Name of service for which to obtain the ordinal.
This macro must be used whenever you need to obtain a virtual device service ordinal. The method employed by Windows 3.1 no longer works.
Example:
GetVxDServiceOrdinal eax, DOSMGR_Begin_V86_App mov esi, offset32 BeginPmAppHook VMMCall Hook_Device_Service
See also VxD_REAL_INIT_SEG