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
A 16:16 pointer to 16-bit callback routine, passed from the 16-bit side.
dwParam
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.

See Also

LOWORD, WOWGlobalAlloc16, WOWGlobalAllocLock16