#253 GetModuleInstance() wrong in WinCE6

open
None
5
2012-04-01
2012-03-14
Anonymous
No

In Windows CE 6, the HINSTANCE returned from ModuleHelper::GetModuleInstance() is different from the one sent to _tWinMain().
This problem does not appear in Windows Mobile 6 or Win32 builds.

This issue causes functions like WTL::CFrameWindowImplBase<>::CreateSimpleCEMenuBar() to not work properly (menus appear but do not open).

It appears this may be because Microsoft has changed the behavior of GetModuleHandleW(0). In WEC6, "If this parameter is NULL, GetModuleHandle returns the process identifier of the calling process."
http://msdn.microsoft.com/en-us/library/bb202816.aspx

Discussion


Anonymous


Cancel   Add attachments