|
-
Aug 28th, 2005, 08:37 PM
#1
Thread Starter
Hyperactive Member
Retrieving Drive Letter
Is it possible to retrieve the Drive letter you're program is on?
Like for example: C:\
Not the current folder but just the Drive letter.
Possible?
-
Aug 28th, 2005, 08:39 PM
#2
Re: Retrieving Drive Letter
 Originally Posted by Tantrum3k
Is it possible to retrieve the Drive letter you're program is on?
Like for example: C:\
Not the current folder but just the Drive letter.
Possible?
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Aug 28th, 2005, 08:42 PM
#3
Thread Starter
Hyperactive Member
Re: Retrieving Drive Letter
It possible without using App.Path?
Or does App.Path work also in a DLL? No EXE...
-
Aug 28th, 2005, 08:44 PM
#4
Re: Retrieving Drive Letter
 Originally Posted by Tantrum3k
It possible without using App.Path?
Or does App.Path work also in a DLL? No EXE...
I am not exactly sure if it will work in a dll or not?
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Aug 28th, 2005, 08:46 PM
#5
Thread Starter
Hyperactive Member
Re: Retrieving Drive Letter
I've tried using App.Path and GetCurrentDirectory in my DLL project and when I used them it just exited. Could have been a coincidence, though.
Any other theories on this?
-
Aug 28th, 2005, 08:51 PM
#6
Re: Retrieving Drive Letter
App.Path should work in any type of executable: DLL or EXE.
-
Aug 30th, 2005, 01:30 AM
#7
Re: Retrieving Drive Letter
It depends who calls it. If it is a non-VB program then the global objects (App etc.) won't exist, and COM interfaces most probably won't be referenced (unless it is a C++ COM app or something). That makes it a bit hard.
If it is a VB program then the global objects will be loaded and so it should work.
I can't remember the API to find the process path but there is one somewhere so if you find that then use it because it will work much better.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|