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?
Printable View
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?
Quote:
Originally Posted by Tantrum3k
VB Code:
Left(App.Path,3)
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?Quote:
Originally Posted by Tantrum3k
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?
App.Path should work in any type of executable: DLL or EXE.
Isn't .DLL a library and not an executable?
Yes. However the point Rhino is making is valid; App.Path should work for you in a ActiveX.DLL created in VB.Quote:
Originally Posted by Tantrum3k
You are confused - DLL stands for "dynamic link library" but it is also an executable file. Difference between dll and standard exe is that dll cannot run on its own so it has to be interfaced (or linked if you will). And I am referring to ActiveX.dll of course created in VB.
You think App.Path would still work with a standard DLL that exports functions in vb6? I'm talking about using an Add-In that makes it possible like vbadvanced for example(which does work because I've used it for months).
It should, but the only way to find out is do it and see what happens.Quote:
Originally Posted by Tantrum3k
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.