This manual presents the syntax of most functions in C-language notation. All such functions are assumed to be declared as FAR PASCAL functions, and Windows will call these functions as such. In general, exported functions in a device driver must execute the standard Windows prolog on entry and epilog on exit.
The following list highlights the calling conventions:
Windows pushes all parameters on the stack in a left to right order (the last parameter shown in the function syntax is closest to the stack pointer). Windows also passes pointer parameters as 32-bit quantities, pushing the selector first then the offset. This allows exported functions to use the lds or les instructions to retrieve pointers from the stack.