A function that gets a browser (IE) version

xiaoxiao2021-03-06  52

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;

}

转载请注明原文地址:https://www.9cbs.com/read-114992.html

New Post(0)