[commit] r2537 - trunk/SDK/BON/Common

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Wed Sep 24 09:55:11 CDT 2014


Author: ksmyth
Date: Wed Sep 24 09:55:11 2014
New Revision: 2537

Log:
Towards supporting WTL

Modified:
   trunk/SDK/BON/Common/Console.cpp

Modified: trunk/SDK/BON/Common/Console.cpp
==============================================================================
--- trunk/SDK/BON/Common/Console.cpp	Wed Sep 24 09:55:07 2014	(r2536)
+++ trunk/SDK/BON/Common/Console.cpp	Wed Sep 24 09:55:11 2014	(r2537)
@@ -11,7 +11,7 @@
 	void Console::SetupConsole(CComPtr<IMgaProject> project)
 	{
 		CComPtr<IMgaClient> client;	
-		CComQIPtr<IDispatch> pDispatch;
+		CComPtr<IDispatch> pDispatch;
 		HRESULT s1 = project->GetClientByName(_bstr_t(L"GME.Application"), &client);
 
 		if ((SUCCEEDED(s1)) && (client != 0))
@@ -19,7 +19,11 @@
 			HRESULT s2 = client->get_OLEServer(&pDispatch);
 			if ((SUCCEEDED(s2)) && (pDispatch != 0) && gmeoleapp == 0)
 			{
-				COMTHROW(pDispatch->QueryInterface(&gmeoleapp));
+#ifdef __AFX_H__
+				COMTHROW(pDispatch->QueryInterface(__uuidof(IGMEOLEApp), (void**)&gmeoleapp));
+#else
+				COMTHROW(pDispatch.Get()->QueryInterface(__uuidof(IGMEOLEApp), (void**)&gmeoleapp));
+#endif
 			}
 		}
 	}


More information about the gme-commit mailing list