[Compuware Corporation] [Compuware NuMega home page] [NuMega Lab] [teal] [DriverStudio] [Image][Image] · Home [Driver Products] Driver Technical Tips · DriverStudio Calling WDM Services from Windows 98 VxDs · DriverBundle · Previews If you are developing VxDs specifically for Windows · Compatibility 98, you might occasionally need to call a WDM service [Downloads] · from a VxD. The Windows 98 DDK has some limited support for doing this, although it isn't fully Wizards documented. · Utilities · NT source In subdirectory lib\i386\free\win98 you'll find examples library wdmvxd.clb. This library gives you linkage to · VxD source most if not all of the WDM entry points provided with examples Windows 98. Each of the object files loads registers · WDM source and invokes INT 2Eh, which traps to a system examples dispatcher. Before invoking the called WDM service, [Resources] · the dispatcher takes care of ensuring that the stack Technical papers is set up for structured exception handling, which is · Useful links supported in WDM drivers. · Technical tips [Support] · The library is set up to look like an import library, even though it does not result in any imports being Support generated. If you use DUMPBIN with the /linkermember · Knowledge base switch, you'll see that the entry points are prefixed · Problem with __imp_. This was done so that you can use submission prototypes directly from wdm.h. · Product registration For example, suppose you wanted to call · Release notes RtlInitUnicodeString from a VxD. You would need this [Shop NuMega] · prototype from wdm.h: Buy it! · Price list NTSYSAPI · How to buy VOID · Sales offices NTAPI RtlInitUnicodeString( PUNICODE_STRING DestinationString, [Y2K Compliance] PCWSTR SourceString ); [More information] In addition, you may need these definitions: #define NTSYSAPI __declspec(dllimport) #define NTAPI __stdcall Then it's simply a matter of having the typedef's and linking against wdmvxd.clb. Use wdmvxd.clb only when absolutely necessary, and always with extreme caution. Because IRQL is largely undefined in VxDs, there are numerous ways to get into trouble when making these calls. Back to technical tip start page. DriverCentral · DriverStudio · Free downloads · Resources · Support and Services · Shop NuMega Compuware NuMega · Tel: +1 603 578-8400 · Updated: 9 August 1999 · Problems? Contact our webmaster.