Forum unknown
· Programming
#Current Drive
3 messages in this thread
I've just gotten back to my determining the current drive name problem we
were discussing last week. You did point me in the right direction! I'm
now stalled on the GetUnitID() call in RKM vol 2, p.C-7. I have no binding
for the call in Lattice. I think the register assignments shown in the
manual actually imply that you have to do it yourself in assembler. No
probs, but what does it all mean? Have you any idea how to set up the
call, and get the return value? Should any special libraries be open like
the "givemeaccesstothedisk.library"?!
Now I'm having another problem. If the user invokes my program from the
"project" icon (that is the data associated with the program) and the icon
and data are in a subdirectory and the program is in the root directory I
have no way of knowing which directory the file is in (did you get all
that)? In other words, the current directory is now ":", but where is the
data?
Look in disk.h in the resource directory of the include directory
(at least that is where it is in the 1.2B4 include disk). As far as
running from an Icon in another directory….hummmmm. I haven't gotten
that close to the metal yet to give a definitive answer, but a guess is
that the calling routine is contained within the passed parameters to
main() as part of the message that has to be returned to the Workbench on
exit of your task. If you look at section 1.3.2 of Amiga DOS developer's
manual, it only gives a clue. Like I say, a guess is that at least a lock
to the calling file is contained within the parameters pointed to via
argv. You might also look at the Amiga DOS calls a few pages further in
the developer's manual.
Look in disk.h in the resource directory of the include directory
(at least that is where it is in the 1.2B4 include disk). As far as
running from an Icon in another directory….hummmmm. I haven't gotten
that close to the metal yet to give a definitive answer, but a guess is
that the calling routine is contained within the passed parameters to
main() as part of the message that has to be returned to the Workbench on
exit of your task. If you look at section 1.3.2 of Amiga DOS developer's
manual, it only gives a clue. Like I say, a guess is that at least a lock
to the calling file is contained within the parameters pointed to via
argv. You might also look at the Amiga DOS calls a few pages further in
the developer's manual.