This example obtains the pointer conversion procedure of the window class, given that we have an anchor-block handle.
#define INCL_WINWINDOWMGR #define INCL_WINTHUNKAPI #include <OS2.H> HWND hwnd; /* . */ PFN pfn; char *classname; WinQueryClassName(hwnd, sizeof(classname), classname); pfn = WinQueryClassThunkProc(classname);