Platform SDK: DLLs, Processes, and Threads |
Use the WOWCallback16 function in 32-bit code called from 16-bit code (through generic thunks) to call back to the 16-bit side (generic callback).
DWORD WINAPI WOWCallback16( DWORD vpfn16, // pointer to callback function DWORD dwParam // parameter for callback function );
The return value comes from the callback routine. If the callback routine returns a WORD type instead of a DWORD type, the upper 16 bits of the return value are undefined and should be ignored by using LOWORD(dwRetCode). If the callback routine has no return value, the entire return value of this function is undefined.
The 16-bit function to be called must be declared with one of the following types.
DWORD FAR PASCAL CallbackRoutine(DWORD dwParam); DWORD FAR PASCAL CallbackRoutine(VOID FAR *vp);
The type used is determined by whether the parameter is a pointer.
If you are passing a pointer, you will need to get the pointer by using either the WOWGlobalAlloc16 or WOWGlobalAllocLock16 function.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Wownt32.h.
Library: Included as a resource in Wow32.dll.
Generic Thunks Overview, 32-bit Generic Thunk Functions, LOWORD, WOWGlobalAlloc16, WOWGlobalAllocLock16