[commit] r1251 - trunk/GME/GMEActiveBrowser

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Tue Apr 5 15:34:23 CDT 2011


Author: ksmyth
Date: Tue Apr  5 15:34:23 2011
New Revision: 1251

Log:
Fix char/wchar_t problem. Fix minor leak

Modified:
   trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp

Modified: trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp	Tue Apr  5 10:06:22 2011	(r1250)
+++ trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp	Tue Apr  5 15:34:23 2011	(r1251)
@@ -2299,7 +2299,7 @@
 		else  // expand the tree until item reached
 		{
 			_bstr_t id;
-			_bstr_t bId = (char*)Id;
+			_bstr_t bId = Id;
 			CComPtr<IMgaObject> iitem;
 			CComPtr<IMgaFCO> fiitem;
 			_bstr_t item[100];
@@ -2308,14 +2308,14 @@
 			
 			pMgaContext->BeginTransaction();
 			CComPtr<IMgaProject> project = pMgaContext->m_ccpProject;
-			COMTHROW(project->GetFCOByID((wchar_t*)bId, &fiitem));
+			COMTHROW(project->GetFCOByID(bId, &fiitem));
 			fiitem.QueryInterface(&iitem);
 			item[itemcount++] = Id;
 			do
 			{
 				COMTHROW(iitem->GetParent(&parent));
-				BSTR bstrid = NULL;
-				COMTHROW(parent->get_ID(&bstrid));
+				_bstr_t bstrid;
+				COMTHROW(parent->get_ID(bstrid.GetAddress()));
 				id = bstrid;
 				item[itemcount++] = id;
 				iitem = parent;


More information about the gme-commit mailing list