[commit] r2478 - trunk/GME/Mga
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Thu May 1 11:30:32 CDT 2014
Author: ksmyth
Date: Thu May 1 11:30:32 2014
New Revision: 2478
Log:
Better error message for CoCreateInstance(Mga.MgaFilter) (which should never be used, because CMgaFilter needs private access to CMgaProject, and must be in the same COM apartment)
Modified:
trunk/GME/Mga/MgaFilter.cpp
Modified: trunk/GME/Mga/MgaFilter.cpp
==============================================================================
--- trunk/GME/Mga/MgaFilter.cpp Thu May 1 11:30:22 2014 (r2477)
+++ trunk/GME/Mga/MgaFilter.cpp Thu May 1 11:30:32 2014 (r2478)
@@ -267,7 +267,8 @@
STDMETHODIMP CMgaFilter::get_Project(IMgaProject **pVal) {
COMTRY {
CHECK_OUTPTRPAR(pVal);
- if(!mgaproject) COMTHROW(E_MGA_ZOMBIE_NOPROJECT);
+ if (!mgaproject)
+ throw_com_error(E_MGA_ZOMBIE_NOPROJECT, L"MgaFilter must be created by IMgaProject.CreateFilter, and not CoCreateInstance");
(*pVal = mgaproject)->AddRef();
} COMCATCH(;);
}
More information about the gme-commit
mailing list