Simse
Programmer
- Feb 24, 2005
- 22
Hi there,
i think, i have quite a tough problem:
in my program i have a hotkey in order to hide or show stuff. in debug-mode it works just fine, but when i release the program, it crashes the SECOND(!) time i hit the hotkey. the error message says something like: "the instruction in "0x6c27....." refers to memory in "0x0...033a". "read" process could not be executed on memory." (it is displayed twice)
the debugger only shows some opcode. now, when i un-comment (is this the right word?) the code inside OnHoyKey(), the problem is still there, when leave the function out completely, the program at least doesn't crash anymore.
here some lines of code that might be relevant:
// in OnInitDialog()
BOOL bRetCode = RegisterHotKey(GetSafeHwnd(),1,MOD_ALT|MOD_SHIFT,'X');
ASSERT(bRetCode);
//in OnHotKey()
bReadOnly=!bReadOnly;
LabelMode->ShowWindow(bReadOnly);
etc...
i have no clue what to do. please help me, thanks
i think, i have quite a tough problem:
in my program i have a hotkey in order to hide or show stuff. in debug-mode it works just fine, but when i release the program, it crashes the SECOND(!) time i hit the hotkey. the error message says something like: "the instruction in "0x6c27....." refers to memory in "0x0...033a". "read" process could not be executed on memory." (it is displayed twice)
the debugger only shows some opcode. now, when i un-comment (is this the right word?) the code inside OnHoyKey(), the problem is still there, when leave the function out completely, the program at least doesn't crash anymore.
here some lines of code that might be relevant:
// in OnInitDialog()
BOOL bRetCode = RegisterHotKey(GetSafeHwnd(),1,MOD_ALT|MOD_SHIFT,'X');
ASSERT(bRetCode);
//in OnHotKey()
bReadOnly=!bReadOnly;
LabelMode->ShowWindow(bReadOnly);
etc...
i have no clue what to do. please help me, thanks