[comp.sys.mac.programmer] Launching Applications via Think C

heddle@clas01.cebaf.gov (David Heddle) (05/10/91)

Dear Friends:

Does anyone have source code in Think C (& embedded assembly) for
launching an application AND a document? For example:

ErrStat    LaunchIt(char *AppName,
                    char *DocName)

{
}


where AppName & DocName could be specified by full or partial path
names and could be in different folders.

I have a version that "sort of" works but will bomb occasionally.
The problem is that it is a real hack -- I haven't mastered HFS
an such thorny issues as when you should or should not open
a working directory. As a result, what I have is not robust and
seems to slowly deteriorate the system.

Actually, it seems to work fine if full path names are provided. Thus
a related question is: Does anyone have a Think C routine which
can reconstruct a full path name from a partial path name:

char   *FullPathName(char *PPName)

As a final note, my ultimate aim is to build this into a WingZ
external. So in the extremely unlikely event that someone out
there has already solved this...

cheers,

dph