When writing an extension, you can reduce the number of bugs and other problems by observing the following:
Pointers can become invalid shortly after they are used within the scope of a single function. Do not store pointers to callback functions for later use outside of the current function. The same advice applies for pointers returned from callback functions.
Creative use of the hMenu or hWnd pointers may cause problems in future versions of Microsoft Exchange. Avoid performing special “tricks” with these pointers.