?
Solved

Process Handle To hInstance

Posted on 2003-03-22
1
Medium Priority
?
808 Views
Last Modified: 2008-02-01
Is there a way to get the hInstance of a process when u only have a handle to that process
or the PID of the process?
0
Comment
Question by:JeFF
1 Comment
 
LVL 48

Accepted Solution

by:
AlexFM earned 150 total points
ID: 8189200
Process.GetProcessById method returns Process by it's ID:

public static Process GetProcessById(
   int processId
);

To get process handle use Process.Handle Property for the Process instance returned by GetProcessById method.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question