473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1521
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: dixie | last post by:
I have been running some code from a form's on open event to run regedit if a registry key does not exist in the registry. It has been working fine, but I have had the path to the registry fix...
2
by: Hayato Iriumi | last post by:
Hello, I have a need to kill a process. It sounds each enough, but the problem is that I have multiple executables running from different paths. Say, I have MyService.exe running from C:\FolderA...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
9
by: Microsoft News Server | last post by:
Hi, I am currently having a problem with random, intermittent lock ups in my ASP.net application on our production server (99% CPU usage by 3 threads, indefinately). I currently use IIS Debug...
8
by: bryan | last post by:
Is there any way I can get the application path (the one returned by Request.ApplicationPath) in the Application_Start method in Global.asax? Request is not valid there. On a related note, is there...
48
by: Alex Chudnovsky | last post by:
I have come across with what appears to be a significant performance bug in ..NET 2.0 ArrayList.Sort method when compared with Array.Sort on the same data. Same data on the same CPU gets sorted a...
1
by: mikebian | last post by:
I created a db that houses info about pictures that were scanned into the PC. The pictures are stored on the file system. I have a form coded so that it shows thumbnails of the images, which are...
0
by: buntyindia | last post by:
Hi, I have a very strange problem with my application. I have developed it using Struts. I have a TextBox With Some fixed value in it and on Submit iam passing it to another page. <html:form...
4
by: tkpmep | last post by:
I've just bought an iMac (OS X 10.5.2, will almost immediately jump to 10.5.3), and am looking to install Python on it, and to use it with XCode, Apple's IDE. Some googling suggests that a number...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.