Article # 333, added by Geoworks, historical record
| first | previous | index | next | last |

How can I get the directory path for my application?



Q. How can I get the directory path for my application?

A. The GenApplicationClass has instance data (GAI_appRef) containing the
   path where the application was launched from.
   MSG_GEN_APPLICATION_GET_APP_INSTANCE_REFERENCE returns GAI_appRef as
   a block handle of the structure AppInstanceReference.

   typedef struct {
       PathName       AIR_fileName;
       FileLongName   AIR_stateFile;
       DiskHandle     AIR_diskHandle;
       byte           AIR_savedDiskData[1];
   } AppInstanceReference;