зеркало из https://github.com/mozilla/pjs.git
NOT PART OF BUILD. Fix to make CBrowse run in VC++ 7.0+
This commit is contained in:
Родитель
21a386279e
Коммит
9b9cc015d4
|
@ -45,11 +45,6 @@ CBrowseApp theApp;
|
|||
|
||||
BOOL CBrowseApp::InitInstance()
|
||||
{
|
||||
// Initialize OLE libraries
|
||||
if (!AfxOleInit())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (!InitATL())
|
||||
return FALSE;
|
||||
|
||||
|
@ -143,18 +138,25 @@ BOOL CBrowseApp::InitATL()
|
|||
{
|
||||
m_bATLInited = TRUE;
|
||||
|
||||
#if _WIN32_WINNT >= 0x0400
|
||||
HRESULT hRes = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
#else
|
||||
HRESULT hRes = CoInitialize(NULL);
|
||||
#endif
|
||||
HRESULT hRes;
|
||||
|
||||
if (FAILED(hRes))
|
||||
#if _WIN32_WINNT >= 0x0400
|
||||
// hRes = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
#else
|
||||
// hRes = CoInitialize(NULL);
|
||||
#endif
|
||||
if (!AfxOleInit())
|
||||
{
|
||||
m_bATLInited = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
//if (FAILED(hRes))
|
||||
//{
|
||||
// m_bATLInited = FALSE;
|
||||
// return FALSE;
|
||||
//}
|
||||
|
||||
_Module.Init(ObjectMap, AfxGetInstanceHandle());
|
||||
_Module.dwThreadID = GetCurrentThreadId();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче