Board index » cppbuilder » How to access Project Version info inside C++ application?
Henk van Winkoop
![]() CBuilder Developer |
Henk van Winkoop
![]() CBuilder Developer |
How to access Project Version info inside C++ application?2007-02-17 02:45:40 AM cppbuilder36 Hello, How do I access the Borland Builder project "Version Info" from within the application? (To be shown in the application "Info" menu-choice) And can this version Build number be automatically incremented with each build? Regards, Henk |
maeder
![]() CBuilder Developer |
2007-02-17 04:27:20 AM
Re:How to access Project Version info inside C++ application?
This newsgroup is about the C++ programming language, but your
question is not. Please direct your browser at info.borland.com/newsgroups/ and read the newsgroup descriptions and guidelines. This will help you find the appropriate newsgroup for your question. |
Tom
![]() CBuilder Developer |
2007-02-17 09:05:30 AM
Re:How to access Project Version info inside C++ application?
Thomas,
How is this not a c++ programming question? He's asking how to obtain the version of the software progrmatically? This is the second time you've posted this to one of his posts that is programming related. -Tom {smallsort} |
Tom
![]() CBuilder Developer |
2007-02-17 09:06:48 AM
Re:How to access Project Version info inside C++ application?QuoteHow do I access the Borland Builder project "Version Info" from within the DWORD VersionHandle; DWORD VersionSize; void *pBuffer; VersionSize = GetFileVersionInfoSize(Application->ExeName.c_str(), &VersionHandle); if (VersionSize) { pBuffer = new char[VersionSize]; if (GetFileVersionInfo(Application->ExeName.c_str(),VersionHandle, VersionSize,pBuffer)) { char *b; UINT buflen; if (VerQueryValue(pBuffer, TEXT("\\StringFileInfo\\040904E4\\FileVersion"), (void** )&b,&buflen)) { lblVersion->Caption = "v" + AnsiString(b); } } delete[] pBuffer; } QuoteAnd can this version Build number be automatically incremented with each -Tom |
Ed Mulroy
![]() CBuilder Developer |
2007-02-17 09:18:51 AM
Re:How to access Project Version info inside C++ application?
FWIW:
I cannot know Mr Maeder's mind but I think he is referring to the fact that version information is a platform specific issue and not a language issue. It might have been more clear had he pointed to the newsgroup borland.public.cppbuilder.nativeapi . Ed QuoteTom wrote in message |
Tom
![]() CBuilder Developer |
2007-02-17 10:04:06 AM
Re:How to access Project Version info inside C++ application?
Understood. =) I seldom pay attention
to which group I'm reading as I flip though the different ones. Though I do try to pick the most appropriate one when I post. -Tom |
maeder
![]() CBuilder Developer |
2007-02-17 06:12:05 PM
Re:How to access Project Version info inside C++ application?
"Tom" < XXXX@XXXXX.COM >writes:
You have made it a language issue now :-) Quote>How do I access the Borland Builder project "Version Info" from within the defer the definition of a variable to where you know how to initialize it, its scope will be narrower. QuoteVersionSize = GetFileVersionInfoSize(Application->ExeName.c_str(), object and the code will be simpler and less error-prone. Third, why define a void * if it's going to hold the address of a char? This causes ... [snip] Quotedelete[] pBuffer; |
JD
![]() CBuilder Developer |
2007-02-18 11:39:47 PM
Re:How to access Project Version info inside C++ application?
XXXX@XXXXX.COM (Thomas Maeder [TeamB]) wrote:
Quote
~ JD |