D
Dom
I have a program that starts a second program with Process p =
Process.Start(...). I expect p.Handle to hold the handle of the
started process, which I then use in a series of SendMessage Calls,
eg, SendMessage (p.Handle, 0x800+1, 0, 0).
However, p.Handle is not the handle of the started process. I know
this because, when the new process starts, it writes its own handle in
the caption of the window, and it does not match p.Handle. Also, if I
jigger the first program in the debugger, and use what I know to be
the handle in the SendMessage calls, it works fine.
What is going wrong?
Process.Start(...). I expect p.Handle to hold the handle of the
started process, which I then use in a series of SendMessage Calls,
eg, SendMessage (p.Handle, 0x800+1, 0, 0).
However, p.Handle is not the handle of the started process. I know
this because, when the new process starts, it writes its own handle in
the caption of the window, and it does not match p.Handle. Also, if I
jigger the first program in the debugger, and use what I know to be
the handle in the SendMessage calls, it works fine.
What is going wrong?