Is there a way to extract information from VS_VERSION_INFO (e.g. FILEVERSION) inside the same application? I know, you probably thinking in a path of:
1. GetModuleFileName(…)
2. GetFileVersionInfoSize(…)
3. GetFileVersionInfo(…)
4. VerQueryValue(…)
BUT! There is a ‘twist’: I need to make activex control to extract it’s own version. So GetModuleFileName would not return the correct filename, it will be parent application name, so the version info will be from parent application too, not the activex control.
Any ideas?
At step 1 you can call GetModuleFileName and pass in the hModule of your DLL. You get the hModule in DllMain():