469,950 Members | 1,803 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

Getting the path for a running DLL

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
1 1397
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.

Similar topics

2 posts views Thread by Hayato Iriumi | last post: by
9 posts views Thread by Microsoft News Server | last post: by
48 posts views Thread by Alex Chudnovsky | last post: by
reply views Thread by buntyindia | last post: by
4 posts views Thread by tkpmep | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.