- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Would someone write all the code required to use the function GetCurrentDirectory? I cannot find any samples in any of the documentation or users guides. I've tried various things that don't work, such as:
Integer inum, ret
character*20 adirectory
ret = GetCurrentDirectory (inum, adirectory)
I don't get any compilation errors, it just doesn't work.
Thanks.
Integer inum, ret
character*20 adirectory
ret = GetCurrentDirectory (inum, adirectory)
I don't get any compilation errors, it just doesn't work.
Thanks.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First argument is length of character buffer:
IF (GetCurrentDirectory(LEN(aDirectory), aDirectory)) THEN !Strip trailing char(0) aDirectory = aDirectory(1 : INDEX(aDirectory, CHAR(0)))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
...of course, aDirectory should probably be far more than 20. In general, you should use constant MAX_PATH (=260).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bah, sorry for 3rd message, "Edit" button doesn't work -- I forgot
.GT.0
in the first post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jugoslav,
Thank you!! It worked perfectly. You are GREAT. Do you know where in the documentation I could find examples of using this (or any) function? Thanks Again!
Thank you!! It worked perfectly. You are GREAT. Do you know where in the documentation I could find examples of using this (or any) function? Thanks Again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are dozens of examples using Win32 APII routines provided with CVF. There's also the new book Compaq Visual Fortran: A Guide to Creating Windows Applications.
Steve
Steve

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page