Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!cica!iuvax!ux1.cso.uiuc.edu!jason From: jason@ux1.cso.uiuc.edu (char *myName) Newsgroups: comp.sys.mac.programmer Subject: Re: Passing params from HyperCard Message-ID: <1990Sep29.045449.15599@ux1.cso.uiuc.edu> Date: 29 Sep 90 04:54:49 GMT References: <1153.2701d4dd@iccgcc.decnet.ab.com> Organization: University of Illinois at Urbana Lines: 30 milikich@iccgcc.decnet.ab.com (Mike Milikich, Allen-Bradley Company) writes: >I have a question about passing parameters to C programs on the Mac. What I >would like to do is mimic the standard main (int argc, char *argv[]) interface, >or write some mechanism which allows parameters to be passed to a standalone >application from HyperCard. >The situation is this : in a HyperCard stack interface to a database, a bunch >of parameters get accumulated which are meant for a query application. Right >now, even though HyperCard knows all of the parameters the report generator >application needs, there isn't a way to pass the data to it. So the program >runs through a series of dialogs, asking the user for information that has >either already been entered (in HyperCard) or is known internally to HyperCard >and really shouldn't need to be re-entered. The application is > 32K (I think), >so converting it to an XCMD/XFCN is out (or is it?). The idea of temporary >files of any sort seems kludgy to me. Any suggestions? Could you use an XCMD/XFCN to write the parameters to the applications data fork or resource fork? Does your application correctly handle finder information as documented in the Segment Loader chapter of IM II? If so, you could pass it a fake finder information structure, setting the fType field to indicate that the application is being launched from HC, and using the remainder of the structure for the desired parameters. If this works at all, I'm sure it's strictly verboten, but it might be worth a try. -- | | |====================| | | | Jason Watts | \ |\ |\ \ | (jazzin@uiuc.edu) |