Kagamin Wrote: > Tyro[a.c.edwards] Wrote: > > > class TopWinClass: WinClass > > { > > this(ushort resId, HINSTANCE hInst, WNDPROC wndProc) > > { > > super(resId, hInst, wndProc); > > SetResIcons(resId); > > wc.lpszMenuName = MAKEINTRESOURCEA(resId); // [PROBLEM] > > } > > } > > > > Every access to wc.lpszMenuName after this point fails. > > Who accesses it? > > MAKEINTRESOURCEA just casts int to char* so it's an invalid pointer while > still valid resource indentifier, windows can differentiate them by zeroed > high word.
casts ushort to char*