Platform SDK: DLLs, Processes, and Threads

WOWCallback16

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
);

Parameters

vpfn16
[in] A 16:16 pointer to 16-bit callback routine, passed from the 16-bit side.
dwParam
[in] Parameter for the 16-bit callback routine. If this value is a pointer, it can be used as either a 16:16 or 0:32 pointer, as long as both sides agree on the semantics.

Return Values

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.

Remarks

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.

Requirements

  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.

See Also

Generic Thunks Overview, 32-bit Generic Thunk Functions, LOWORD, WOWGlobalAlloc16, WOWGlobalAllocLock16