cCall

include vmm.inc

cCall Procedure
cCall Procedure, Param1, Flags
cCall Procedure, <Param1, Param2, Param3, ..., ParamN>, Flags
 

Pushes the specified parameters on the stack and calls the specified procedure. When the procedure returns, the macro pops the parameters from the stack.

Procedure
Name of the procedure to call. This parameter can be either a local or public procedure, but must be defined within the virtual device making the call.
Param1, Param2, Param3, ..., ParamN
Optional parameters to pass to the procedure. If more than one parameter is given, they must be separated with commas and enclosed in angle brackets (<>).
Flags
Optional parameter, that if set to the value PRESERVE_FLAGS, causes the cCall macro to preserve the flags register on return from the called procedure. The cCall macro normally changes the contents of the flags register as part of its cleanup operations.

This macro pushes the parameters using the C-language calling convention, in order from right to left, then removes the parameters from the stack after the procedure returns. It also assumes that the called procedure follows the C-language register conventions, viz., that the EAX, ECX, EDX, and flags registers may be modified by the call, and that the return value is placed in the EAX register (and sometimes also the EDX register). If your procedure does not follow these rules, you should not use the cCall macro.

See Also

VMMCall, VxDCall