Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Equivalent of SYS(16)
Message
De
08/04/1998 18:48:50
 
 
À
08/04/1998 13:26:23
Raul Davila
Davila Programming Services
Toa Alta, Porto Rico
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00090128
Message ID:
00090623
Vues:
26
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform