| | |
get hwnd from process id
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
Hey
so as i mentioned here http://www.daniweb.com/forums/post840142.html i need to check if a process is responding by using sendmessage
however i have no idea how to get the hwnd because i start the process using system::diagnostics::process
so this program starts in a console, so does it not have a handle?
its a really weird program... a halo server, the program takes over the console window.... so is it possible to send it a message?
how do i get the hwnd from pid?
process->Mainwindowtitle and mainwindowhandle dont return anything
yea im confusing myself... understand?
so as i mentioned here http://www.daniweb.com/forums/post840142.html i need to check if a process is responding by using sendmessage
however i have no idea how to get the hwnd because i start the process using system::diagnostics::process
C++ Syntax (Toggle Plain Text)
process->StartInfo->WorkingDirectory=sinfo->workingDirectory; process->StartInfo->Arguments=" -exec "+sinfo->init+" -port "+sinfo->port+" "+sinfo->options; process->StartInfo->FileName = sinfo->exe; process->StartInfo->UseShellExecute=true;
its a really weird program... a halo server, the program takes over the console window.... so is it possible to send it a message?
how do i get the hwnd from pid?
process->Mainwindowtitle and mainwindowhandle dont return anything
yea im confusing myself... understand?
this.love(*);
&hea/rts;
&hea/rts;
call PostThreadMessage()
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
Join Date: Oct 2008
Posts: 40
Reputation:
Solved Threads: 6
I'm not a .NET programmer but according to the documentation:
Which compiles successfully as a CLR console program.
C++ Syntax (Toggle Plain Text)
IntPtr hwnd = process->Handle;
Which compiles successfully as a CLR console program.
![]() |
Similar Threads
- C++ WIN API, capture env variables of another process (C++)
- Send Minmize Window to a Running Process (C#)
- process output (C++)
- Showing Hidden Process (C#)
- Process exe path (Pascal and Delphi)
- Error Linking KeyLogger.exe (C++)
- GDI (C)
Other Threads in the C++ Forum
- Previous Thread: Need help. Solution will probably include pointers.
- Next Thread: Copy Constructor
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion convert count data database delete desktop developer directshow dll dynamiccharacterarray email encryption error file forms fstream function functions game generator getline google graph homeworkhelper iamthwee ifstream input int integer java lib linkedlist linux list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates text tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






