Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!stat!aaron From: aaron@stat.tamu.edu (Aaron Hightower) Newsgroups: comp.sys.amiga.tech Subject: Re: arp.library file requester Message-ID: <8240@helios.TAMU.EDU> Date: 14 Sep 90 06:17:11 GMT References: <4811@jato.Jpl.Nasa.Gov> Sender: usenet@helios.TAMU.EDU Lines: 41 In article <4811@jato.Jpl.Nasa.Gov> zupke@mars.UUCP (Brian Zupke) writes: >Howdy! Could anyone tell me how to use the ARP FileRequester function? >Looking at the documentation (an not having an example) this is not very >clear. BTW I have Manx Aztec 5.0. An example of its use would be >perfect. Thanks in advance. > >-Brian /* Example of the arp file-requester (Aaron Hightower) aaron@stat.tamu.edu (128.194.28.1) */ #include #include #include struct ArpBase *ArpBase; struct FileRequester fileRequester; char filename[FCHARS+1]; char filepath[DSIZE+1]; main() { fileRequester.fr_Hail = "Does this work?"; fileRequester.fr_File = filename; fileRequester.fr_Dir = filepath; if((ArpBase = (struct ArpBase *) OpenLibrary("arp.library",0))==NULL) { printf("Unable to open the arp.library.\nPlease use the arp.library %s" ,"V1.3 or higher to run this program.\n"); exit(0); } FileRequest(&fileRequester); printf("File: %s, Dir: %s\n",fileRequester.fr_File,fileRequester.fr_Dir); CloseLibrary(ArpBase); return 0; }