Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Version information
Message
From
03/05/2001 12:48:07
 
 
To
03/05/2001 08:51:45
General information
Forum:
Borland C++ Builder
Category:
C++ Builder Language
Miscellaneous
Thread ID:
00502944
Message ID:
00503123
Views:
25
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...
Previous
Reply
Map
View

Click here to load this message in the networking platform