Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C++ help
Message
De
14/08/1997 20:45:27
 
 
À
13/08/1997 11:52:14
Edward Crawford
City Facilities Management
Glasgow, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00044460
Message ID:
00044823
Vues:
29
Please save the following code as C file, it works. Use with VFP declare integer ConvertTime IN timeconv.dll String @Buffer Buffer = space(64) ? ConvertTime(@Buffer) ? Buffer #define STRICT #include #include BOOL WINAPI DllMain(HANDLE hInst, ULONG ulReason, LPVOID pReserved) { switch (ulReason) { case DLL_PROCESS_ATTACH: break; case DLL_PROCESS_DETACH: break; default: break; } return (TRUE); } int WINAPI ConvertTime(LPSTR pBuffer) { int iResult = -1; struct tm *newtime; time_t aclock; aclock = time(NULL); // 8067157205 is invalid, localtime() returns NULL pointer if (pBuffer && (newtime = localtime(&aclock))) { lstrcpy(pBuffer, asctime(newtime)); iResult = lstrlen(pBuffer); } return (iResult); } Winfried
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform