creating a System::Diagnostics::Process^ from a HANDLE to a process  
Author Message
cadouthat





PostPosted: Visual C++ General, creating a System::Diagnostics::Process^ from a HANDLE to a process Top

i have a HANDLE to a process, but i need to create a Process^ from the handle so i can do more advanced stuff with it

thanks in advance




Visual C++2  
 
 
ZaccheusUK





PostPosted: Visual C++ General, creating a System::Diagnostics::Process^ from a HANDLE to a process Top

IF you can get the process id from the process handle, then you can use this .net function:

http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.getprocessbyid.aspx

 

There's a recently introduced function in the Windows API (see Requirements)  that gets the id from a handle:

http://msdn2.microsoft.com/en-us/library/ms683215.aspx



 
 
cadouthat





PostPosted: Visual C++ General, creating a System::Diagnostics::Process^ from a HANDLE to a process Top

alright thanks =-)