Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
// Declarations for Version from Version Resource class
// Written by Frank Solomon 2000
//
#ifndef __ver_h
#define __ver_h
#include <windows.h>
namespace fss {
class VersionResource {
UINT VLen;
LPVOID VBuf;
char VString[1024];
public:
VersionResource();
const char *c_str() const;
};
} // namespace fss
#endif //__ver_h
// Definitions for Version from Version Resource class
// Written by Frank Solomon 2000
//
#include "ver.h"
namespace fss {
VersionResource::VersionResource() {
HRSRC hrV = FindResource(NULL,"#1",RT_VERSION);
if(hrV == NULL) {
throw;
} else {
HGLOBAL hgrV = LoadResource(NULL,hrV);
if(hgrV == NULL) {
throw;
} else {
LPVOID pV = LockResource(hgrV);
if(VerQueryValue(pV,"\\StringFileInfo\\040904b0\\FileVersion",&VBuf,&VLen)) {
if(VLen > 0 && VLen < 1024) {
wsprintf(VString,"%s",VBuf);
} else {
throw;
}
}
FreeResource(hgrV);
}
}
}
const char *VersionResource::c_str() const {
return (const char *)VString;
}
}
#include "ver.h"
using fss::VersionResource;
int main(int argc, const char *argv[]) {
VersionResource V;
cout << "Version is " << V.c_str() << endl;
return 0;
}