This function queries the memory model associated with a window.
#define INCL_WINTHUNKAPI /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwnd; /* Window handle. */ ULONG ulModel; /* Memory model associated with the window. */ ulModel = WinQueryWindowModel(hwnd);