Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivalent of SYS(16)
Message
From
08/04/1998 18:48:50
 
 
To
08/04/1998 13:26:23
Raul Davila
Davila Programming Services
Toa Alta, Puerto Rico
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00090128
Message ID:
00090623
Views:
21
Ok, after reading the messages here (and doing some searching with DejaNews), I've come up with the following:

char lpFileName [1000];
char *ptr, c = '\\';

GetModuleFileName(GetModuleHandle(NULL),lpFileName,sizeof(lpFileName)-1);
ptr = strrchr(lpFileName, c);
*(strrchr(lpFileName, '\\')+1) = '\0';
chdir(lpFileName);
MessageBox(0,lpFileName, "Hi There", MB_OK+MB_ICONSTOP);

Which should leave me in the relevant directory, and I can run my exe from there.

Thanks to all who contributed.

Matt.
Previous
Reply
Map
View

Click here to load this message in the networking platform