I've got in this trouble:
I wrote an ActiveX named "Comp.ocx",and I used it in an application named "Test.exe".
I want the ActiveX control display its own version infomation.
Then I tried to use these codes in the ActiveX:
HRSRC hsrc = FindResource(0,MAKEINTRESOURCE(VS_VERSION_INFO),RT_VERSION);
HGLOBAL hgbl=LoadResource(0,hsrc);
BYTE * pBt = (BYTE*)LockResource(hgbl);
VS_FIXEDFILEINFO* pFInfo = (VS_FIXEDFILEINFO*)(pBt+40);
CString str;
str.Format("ActiveX Version:%d.%d.%d.%d",HIWORD(pFInfo->dwFileVersionMS),
LOWORD(pFInfo->dwFileVersionMS),HIWORD(pFInfo->dwFileVersionLS),
LOWORD(pFInfo->dwFileVersionLS));
...
When I ran "Test.exe",I found the ActiveX control failed to display its own version
information,but displayed the version infomation of "Test.exe".
I tried to search how to solve this,but nothing.
May someone help me? Thanks very much!!!
What I have tried:
I tried to search on the net how to solve this problem,but found useless.