Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Version information
Message
De
03/05/2001 12:48:07
 
 
À
03/05/2001 08:51:45
Information générale
Forum:
Borland C++ Builder
Catégorie:
Langage C++ Builder
Divers
Thread ID:
00502944
Message ID:
00503123
Vues:
24
problem solved !!!

void TfrmCTdir::SetCaption(void) {
unsigned long lSize;
unsigned int iLen;
char *pValue, *pBuf, *pKey, *sFile = Application->ExeName.c_str();
lSize = GetFileVersionInfoSize( sFile, &lSize );
if( lSize > 0 ) {
pValue = (char*) malloc(1024);
pKey = (char*) malloc(1024);
pBuf = (char*) malloc(lSize);
GetFileVersionInfo( sFile, 0, lSize, pBuf );
if( VerQueryValue( pBuf, "StringFileInfo\\040904E4\\FileVersion"
, (void**) &pValue, &iLen ) ) {
sprintf( pBuf, "CTdir version %s", pValue );
this->Caption = pBuf;
}
free( pValue );
free( pKey );
free( pBuf );
} else {
Application->MessageBox("Version information not found","CTdir error", MB_OK + MB_ICONERROR );
}
}
============================================================
'C' is shorthand for Confusion, 'C++' much more confusion...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform