Joined: 26-Mar-2004 Posts: 1185
From: Salt Lake City, Utah, USA
I have a question that might have a simple answer or not. When you have a program that a user can install anywhere, how can the program get the drive and folder where it's been copied to?
_________________ X5000 / microA1(OS4.1 FE U2) / CodeBench / Imagine / Blender Lightwave 2019 / Microsoft Visual C++
Status: Offline
abalaban
Re: Program path question Posted on 3-May-2013 13:39:33
Really easy just use IDOS->GetProgramDir() and if you want to disambiguate the result (under several volume with the same name can be mounted at the same time ex. USB Key with name 'NoName') use IDOS->DevNameFromLock() on the result.
_________________ AOS 4.1 : I dream it, Hyperion did it ! Now dreaming AOS 4.2... Thank you to all devs involved for this great job !
Status: Offline
Hypex
Re: Program path question Posted on 3-May-2013 17:07:38
Joined: 6-May-2007 Posts: 11351
From: Greensborough, Australia
@thinkchip
By convention we use "PROGDIR:' to find the program directory. So that path can be used as a root volume pointing to the program directory or be CD'ed to.