Zitat:
Although hInstApp is declared as an HINSTANCE for compatibility with 16-bit Windows applications, it is not a true HINSTANCE. It can be cast only to an int and compared to either 32 or the following SE_ERR_XXX error codes.
Aber auch echte HInstances musst du grundsätzlich nicht schließen, da es keine Kernel-Handles sind, sondern Zeiger.