Log in

View Full Version : problem with bmsg


xoder
February 6th, 2004, 13:11
hi,

i have a little problem with bmsg breakpoints. the program im working on is loaded so in softice i typed "proc" to get a list of the programs currently running. i noted the programs name and did "hwnd pgrogname". as a result i get a long list of window handles, classes etc. the button im looking for has the handle 20208, i also confirmed this with spy++ which gave me the same window handle for this button. now i wanna set a breakpoint on this button when its being pressed so i use: bmsg 20208 WM_COMMAND
but softice keeps telling me that 20208 is an "Invalid window Handle"
can someone please tell me what im doing wrong?


regards xoder

evlncrn8
February 6th, 2004, 13:15
same problem here, its like the handles sice reports arent valid for the window, so i just get the window proc,and set a breakpoint there.. does the job

xoder
February 6th, 2004, 13:21
Quote:
[Originally Posted by evlncrn8]same problem here, its like the handles sice reports arent valid for the window, so i just get the window proc,and set a breakpoint there.. does the job


thanks for your advice with the window proc breakpoint, but im still wondering why the handle softice tells me isnt valid. what kind of breakpoint do you use on the window-proc? bpx ?

esther
February 6th, 2004, 13:30
did you try wm_lbuttonup or wm_rbuttonup or without these commands?

bmsg 1234

xoder
February 6th, 2004, 13:45
i typed it exactly like i did above: "bmsg 20208 WM_COMMAND" but since softice said invalid window handle i think it has something to to with the actual handle (20208) but i have no clue whats wrong, since softice gave me the handle with the hwnd command.

dELTA
February 6th, 2004, 15:34
Have you tried switching to the context of the target process before attempting to set the breakpoint? I don't know if that will make any difference, but it's sure worth a try...

naides
February 6th, 2004, 15:50
Quote:
[Originally Posted by dELTA]Have you tried switching to the context of the target process before attempting to set the breakpoint? I don't know if that will make any difference, but it's sure worth a try...


I have had the same problem: 'invalid handle'.

It happens in Win2K and XP, along with DS 2.7. I remotely remember that for the brief time I had DS 3.0 it went back to working.

BMSG IS context sensitive, but even when you are in context, refuses to work sometimes. Perhaps the concept of context is more complex when dealing with Msgs.

xoder
February 6th, 2004, 16:02
im using DS 3.1 on win2k. i have set the BreakInSharedMods=on to have breakpoints in pre 3.x mode(even i dont know if it will make any difference). is there any other way to set the breakpoint in the apps context? any other suggestions how to make softice trigger when pressing a register button(delphi app)?