By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,309 Members | 1,452 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,309 IT Pros & Developers. It's quick & easy.

Getting the path for a running DLL

P: n/a
Hi

I was wondering how to get the path that a DLL is running from (from a method within that DLL, e.g. it's own install path))? I have a web app with two modules. I'd like one of them to be able to read a file from the web app's bin directory (where the DLL is running from), but I can't find any information about how to get the path. The current folder returns the system32 folder, not the bin folder.

Thanks for your help.
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Regular DLL can get it's full path by calling GetModuleFileName
Not sure that this will work with .NET dll.

George.

"Craig" <an*******@discussions.microsoft.com> wrote in message
news:2C**********************************@microsof t.com...
Hi

I was wondering how to get the path that a DLL is running from (from a method within that DLL, e.g. it's own install path))? I have a web app with
two modules. I'd like one of them to be able to read a file from the web
app's bin directory (where the DLL is running from), but I can't find any
information about how to get the path. The current folder returns the
system32 folder, not the bin folder.
Thanks for your help.

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.