зеркало из https://github.com/mozilla/pjs.git
Implement GUID comparison method inilne rather than rely on ATLs constantly changing method. b=127982 r=chak@netscape.com sr=rpotts@netscape.com a=asa@mozilla.org
This commit is contained in:
Родитель
fe547600a1
Коммит
f474e147b8
|
@ -185,6 +185,19 @@ CMozillaBrowser::~CMozillaBrowser()
|
|||
Terminate();
|
||||
}
|
||||
|
||||
// See bug 127982:
|
||||
//
|
||||
// Microsoft's InlineIsEqualGUID global function is multiply defined
|
||||
// in ATL and/or SDKs with varying namespace requirements. To save the control
|
||||
// from future grief, this method is used instead.
|
||||
static inline BOOL _IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
|
||||
{
|
||||
return (
|
||||
((PLONG) &rguid1)[0] == ((PLONG) &rguid2)[0] &&
|
||||
((PLONG) &rguid1)[1] == ((PLONG) &rguid2)[1] &&
|
||||
((PLONG) &rguid1)[2] == ((PLONG) &rguid2)[2] &&
|
||||
((PLONG) &rguid1)[3] == ((PLONG) &rguid2)[3]);
|
||||
}
|
||||
|
||||
STDMETHODIMP CMozillaBrowser::InterfaceSupportsErrorInfo(REFIID riid)
|
||||
{
|
||||
|
@ -194,9 +207,9 @@ STDMETHODIMP CMozillaBrowser::InterfaceSupportsErrorInfo(REFIID riid)
|
|||
&IID_IWebBrowser2,
|
||||
&IID_IWebBrowserApp
|
||||
};
|
||||
for (int i=0;i<(sizeof(arr)/sizeof(arr[0]));i++)
|
||||
for (int i = 0; i < (sizeof(arr) / sizeof(arr[0])); i++)
|
||||
{
|
||||
if (::ATL::InlineIsEqualGUID(*arr[i],riid))
|
||||
if (_IsEqualGUID(*arr[i], riid))
|
||||
return S_OK;
|
||||
}
|
||||
return S_FALSE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче