Figure 1    16-bit WOW APIs Exported in KRNL386.EXE

Export
Ordinal
Function
Prototype
513
DWORD FAR PASCAL Loadlibraryex32W(LPCSTR lpszLibFile, DWORD hFile, DWORD dwFlags);
514
DWORD FAR PASCAL FreeLibrary32W(DWORD hLibModule);
515
DWORD FAR PASCAL GetProcAddress32W(DWORD hModule, LPCSTR lpszProc);
516
DWORD FAR PASCAL GetVDMPointer32W(LPVOID vp, UINT fMode);
517
DWORD FAR PASCAL CallProc32W( DWORD p1, ... , DWORD lpProcAddress, DWORD fAddressConvert, DWORD cParams);
518
DWORD FAR CDECL CallProcEx32W( DWORD, DWORD, DWORD, ... );


Figure 2   Functions in WOW32.DLL

VDM Memory Management and Manipulation Functions
WORD
WINAPI
WOWGlobalAlloc16(WORD wFlags, DWORD cb);
WORD
WINAPI
WOWGlobalFree16(WORD hMem);
DWORD
WINAPI
WOWGlobalLock16(WORD hMem);
BOOL
WINAPI
WOWGlobalUnlock16(WORD hMem);
DWORD
WINAPI
WOWGlobalAllocLock16(WORD wFlags, DWORD cb, WORD *phMem);
WORD
WINAPI
WOWGlobalUnlockFree16(DWORD vpMem);
DWORD
WINAPI
WOWGlobalLockSize16(WORD hMem, PDWORD pcb);
LPVOID
WINAPI
WOWGetVDMPointer(DWORD vp, DWORD dwBytes, BOOL fProtectedMode);
LPVOID
WINAPI
WOWGetVDMPointerFix(DWORD vp, DWORD dwBytes, BOOL fProtectedMode);
VOID
WINAPI
WOWGetVDMPointerUnfix(DWORD vp);
Handle Conversion Functions
HANDLE
WINAPI
WOWHandle32 (WORD, WOW_HANDLE_TYPE);
WORD
WINAPI
WOWHandle16 (HANDLE, WOW_HANDLE_TYPE);
Nonpreemptive Scheduler Functions
VOID
WINAPI
WOWYield16(VOID);
VOID
WINAPI
WOWDirectedYield16(WORD htask16);
16-bit Callback Functions
DWORD
WINAPI
WOWCallback16(DWORD vpfn16, DWORD dwParam);
BOOL
WINAPI
WOWCallback16Ex(DWORD vpfn16, DWORD dwFlags, DWORD cbArgs, PVOID pArgs,
PDWORD pdwRetCode);


Figure 3   Handle Conversion Macros

16- to 32-bit Conversion Macros
#define HWND_32(h16)
((HWND) (WOWHandle32(h16, WOW_TYPE_HWND)))
#define HMENU_32(h16)
((HMENU) (WOWHandle32(h16, WOW_TYPE_HMENU)))
#define HDWP_32(h16)
((HDWP) (WOWHandle32(h16, WOW_TYPE_HDWP)))
#define HDROP_32(h16)
((HDROP) (WOWHandle32(h16, WOW_TYPE_HDROP)))
#define HDC_32(h16)
((HDC) (WOWHandle32(h16, WOW_TYPE_HDC)))
#define HFONT_32(h16)
((HFONT) (WOWHandle32(h16, WOW_TYPE_HFONT)))
#define HMETAFILE_32(h16)
((HMETAFILE) (WOWHandle32(h16, WOW_TYPE_HMETAFILE)))
#define HRGN_32(h16)
((HRGN) (WOWHandle32(h16, WOW_TYPE_HRGN)))
#define HBITMAP_32(h16)
((HBITMAP) (WOWHandle32(h16, WOW_TYPE_HBITMAP)))
#define HBRUSH_32(h16)
((HBRUSH) (WOWHandle32(h16, WOW_TYPE_HBRUSH)))
#define HPALETTE_32(h16)
((HPALETTE) (WOWHandle32(h16, WOW_TYPE_HPALETTE)))
#define HPEN_32(h16)
((HPEN) (WOWHandle32(h16, WOW_TYPE_HPEN)))
#define HACCEL_32(h16)
((HACCEL) (WOWHandle32(h16, WOW_TYPE_HACCEL)))
#define HTASK_32(h16)
((DWORD) (WOWHandle32(h16, WOW_TYPE_HTASK)))
#define FULLHWND_32(h16)
((HWND) (WOWHandle32(h16, WOW_TYPE_FULLHWND)))
32- to 16-bit Conversion Macros
#define HWND_16(b2)
(WOWHandle16(b2, WOW_TYPE_HWND))
#define HMENU_16(b2)
(WOWHandle16(b2, WOW_TYPE_HMENU))
#define HDWP_16(b2)
(WOWHandle16(b2, WOW_TYPE_HDWP))
#define HDROP_16(b2)
(WOWHandle16(b2, WOW_TYPE_HDROP))
#define HDC_16(b2)
(WOWHandle16(b2, WOW_TYPE_HDC))
#define HFONT_16(b2)
(WOWHandle16(b2, WOW_TYPE_HFONT))
#define HMETAFILE_16(b2)
(WOWHandle16(b2, WOW_TYPE_HMETAFILE))
#define HRGN_16(b2)
(WOWHandle16(b2, WOW_TYPE_HRGN))
#define HBITMAP_16(b2)
(WOWHandle16(b2, WOW_TYPE_HBITMAP))
#define HBRUSH_16(b2)
(WOWHandle16(b2, WOW_TYPE_HBRUSH))
#define HPALETTE_16(b2)
(WOWHandle16(b2, WOW_TYPE_HPALETTE))
#define HPEN_16(b2)
(WOWHandle16(b2, WOW_TYPE_HPEN))
#define HACCEL_16(b2)
(WOWHandle16(b2, WOW_TYPE_HACCEL))
#define HTASK_16(b2)
(WOWHandle16(b2, WOW_TYPE_HTASK))