home *** CD-ROM | disk | FTP | other *** search
- { return path and name of a file
- via a WB 2.04 ASL file requester }
-
- #include <stddef.h>
-
- SUB request_file$
- declare function AllocFileRequest& library asl
- declare function FreeFileRequest library asl
- declare function RequestFile& library asl
-
- library asl
-
- FileReq&=AllocFileRequest
- response&=RequestFile(FileReq&)
-
- if response& <> NULL then
- file$=cstr(peekl(FileReq&+4))
- dir$=cstr(peekl(FileReq&+8))
- path$=dir$
- if right$(dir$,1) <> ":" and dir$<>"" then path$=path$+"/"
- path$=path$+file$
- else
- path$=""
- end if
-
- FreeFileRequest(FileReq&)
-
- library close asl
-
- request_file$=path$
- END SUB
-