Use the CallProcEx32W function in 16-bit code to call an entry-point function in a 32-bit DLL. CallProcEx32W is similar to CallProc32W, but it uses the C calling convention to allow a variable number of arguments.
DWORD FAR CallProcEx32W(
DWORD nParams, // number of parameters passed
DWORD fAddressConvert, // bit mask
DWORD lpProcAddress, // the DLL function to be called
DWORD param1 // parameter for DLL function
... // up to 32 parameters for DLL function
);
Value | Meaning |
---|---|
CPEX_DEST_STDCALL | The function uses the standard-call calling convention. This is the default. |
CPEX_DEST_CDECL | The function uses the C calling convention. |
Returns the return value from the 32-bit entry-point function represented by lpProcAddress. The return value can also be zero under the following conditions:
CallProc32W and CallProcEx32W do not automatically fix global memory handles that are translated to 0:32 pointers. Therefore, you must call the GlobalFix or GlobalWire function on the handle first and GlobalUnfix and GlobalUnwire afterward.
Windows 95 and Windows 98: Global compaction can move memory blocks at any time while the current thread is executing 32-bit code. Because of this, not fixing segments before calling the target function works in Windows NT, but may cause race conditions in Windows 95 or Windows 98.
CallProc32W, GetProcAddress32W