In my DLL attached to an application I would like to find its (the application's) base address, but I don't think I can use FindProcessByName
as I will have multiple instances of this application running. How can I accomplish this?
Asked
Active
Viewed 143 times
1

Soner Gönül
- 97,193
- 102
- 206
- 364

user4520
- 3,401
- 1
- 27
- 50
2 Answers
1
You can use Process.GetCurrentProcess()
.

Daniel Brückner
- 59,031
- 16
- 99
- 143
-
And how would you get the baseAddress? Because that is not a property on Process.... – rene Apr 20 '14 at 15:08
-
The base address in which address space? – Daniel Brückner Apr 20 '14 at 15:14
-
That is a good question. I wonder what the OP is going to do with that info...you answer got accepted so all is good now... – rene Apr 20 '14 at 15:20
1
Process.ProcessName property holds an executable file name, such as Outlook, that does not include the .exe extension or the path. It is helpful for getting and manipulating all the processes that are associated with the same executable file.
Here is the reference link.

Palak Bhansali
- 731
- 4
- 10