HRESULT CCGAEDITORAPPPPPPP :: GetBrowserversion (LPDWORD PDWMAJOR, LPDWORD PDWMINOR)
{
Hinstance hbrowser;
IF (Isbadwriteptr (PDWMAJOR, SIZEOF (DWORD) ||
Isbadwriteptr (PDWminor, Sizeof (DWORD)))
Return E_INVALIDARG;
* pdwmajor = 0;
* pdwminor = 0;
Hbrowser = loadingLibrary (Text ("shdocvw.dll");
IF (hbrowser)
{
HRESULT HR = S_OK;
DllgetVersionProc PDLGETVERSION;
Pdllgetversion = (DllgetVersionProc) GetProcaddress (Hbrowser, Text ("DllgetVersion"));
IF (PDLGETVERSION)
{
DLLVERSIONFO DVI;
ZeromeMory (& DVI, SIZEOF (DVI));
Dvi.cbsize = sizeof (dvi);
HR = (* pdllgetversion) (& DVI);
En (ac))
{
* pdwmajor = dvi.dwmajorversion;
* pdwminor = dvi.dwminorversion;
}
}
Else
{
HR = E_FAIL;
}
Freelibrary (HBROWSER);
Return HR;
}
Return E_FAIL;
}