The information in this article applies to:
SUMMARYThe sample found on the Microsoft Development Platform DDK CD in \DDK\BASE\SAMPLES\CVXD32 implements two methods of "wrapping" VxDCalls in the C programming language. MORE INFORMATION
A wrapper is a friendly function call or method that hides implementation
details of a difficult programming interface. The VxD in
\DDK\BASE\SAMPLES\CVXD32 implements two different wrappers for submitting
VxDCalls in C.
Because standard C appends an underscore to the beginning of a symbol there is no conflict with the VMM_Service Get_Sys_VM_Handle. You can also find the definitions of HVM, VXDINLINE, and Touch_Register in VMM.H file. In this way, you can use inline assembly and hide the details in an inline function in a header file. There are, however, limitations to using inline functions for your wrappers:
MAKE_HEADER and PREPEND are wrappers themselves to hide the implemtation of the segment structure of a VxD. In this way, arguements can be passed to and from VxD services. Notice that the Get_Sys_VM_Handle inline assembly is used to return the handle, but if more significant pre- or post-processing is required, you should implement the wrapper in Assembler. Unlike VMM.H, the include files defining most VxD services have no predefined C wrappers for their services. Therefore, it is the responsibility of the programmer to build inline and assembly wrappers for the services needed. In this way, any VxD service is callable from C. In VxDWraps.Inc, you can find wrapper declarations for the following groups of functions: VMMRegBe sure to include the appropriate header (.h) file before VxDWraps.h in your source code. Additional query words: 4.00 VMMCall MAKE_HEADER win95
Keywords : kbnokeyword kbDDK |
Last Reviewed: March 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |