HowTo read/display version info
-
Using Visual Studio 6.0, C/C++ === Question 1 I am using the Workspace | ResourceView | Version to input my current version info. How do I read that info from within my code, so that I can display it to the User on their demand? === Question 2 I am writing a Dialog-Based program. Is there any way to show the User the About Box? Many thanks, Robert :)
-
Using Visual Studio 6.0, C/C++ === Question 1 I am using the Workspace | ResourceView | Version to input my current version info. How do I read that info from within my code, so that I can display it to the User on their demand? === Question 2 I am writing a Dialog-Based program. Is there any way to show the User the About Box? Many thanks, Robert :)
Check out
VerQueryValue()
andGetFileVersionInfo()
. Robert Palma Jr. wrote: I am writing a Dialog-Based program. Is there any way to show the User the About Box? Yes. If you used AppWizard, it was one of the choices.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
-
Check out
VerQueryValue()
andGetFileVersionInfo()
. Robert Palma Jr. wrote: I am writing a Dialog-Based program. Is there any way to show the User the About Box? Yes. If you used AppWizard, it was one of the choices.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
Thank-you David, I am working on it. Sounds like I have to read the version info FROM the file on the HD, rather than being able to read it from the image that is currently in memory. Thanks again, Robert
-
Thank-you David, I am working on it. Sounds like I have to read the version info FROM the file on the HD, rather than being able to read it from the image that is currently in memory. Thanks again, Robert
I am not sure about your statement. If you have the module handle (an image in memory), I think you can load the version resource from that as well, meaning you CAN get the version information from an image in memory. I have not done this before, but this is what I would try to do: For an image in memory, you can try
FindResource
->LoadResource
->LockResource
-> Use pointer in call toVerQueryValue
->FreeResource
. I think you can useSizeofResource
if you need total size of resource information (in lieu ofGetFileVersionInfoSize
). You are usingFindResource, LoadResource, and LockResource
instead ofGetFileVersionInfo
.FreeResource
is called when you are done so that the memory is freed.