summaryrefslogtreecommitdiffstats
path: root/Source/cmCallVisualStudioMacro.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2008-02-15 16:49:58 (GMT)
committerDavid Cole <david.cole@kitware.com>2008-02-15 16:49:58 (GMT)
commitca2a16c0a221bb0c3be4491125c044c9112836e0 (patch)
tree38e2fab8d33aaf4915039dede364d6d34d815744 /Source/cmCallVisualStudioMacro.cxx
parented76198b840b83d49ee4eba9ca0c7753b41d54cf (diff)
downloadCMake-ca2a16c0a221bb0c3be4491125c044c9112836e0.zip
CMake-ca2a16c0a221bb0c3be4491125c044c9112836e0.tar.gz
CMake-ca2a16c0a221bb0c3be4491125c044c9112836e0.tar.bz2
ENH: Add code to support calling the VS reload macro from Visual Studio 7.1 and 9.0 in addition to 8.0 sp1... Make new macros file with VS 7.1 so that it can be read by 7.1 and later. VS 7.1 does not appear to run the macros while a build is in progress, but does not return any errors either, so for now, the reload macro is not called when using 7.1. If I can figure out how to get 7.1 to execute the macro, I will uncomment the code in cmGlobalVisualStudio71Generator::GetUserMacrosDirectory() to activate executing the macros in VS 7.1, too.
Diffstat (limited to 'Source/cmCallVisualStudioMacro.cxx')
-rw-r--r--Source/cmCallVisualStudioMacro.cxx36
1 files changed, 35 insertions, 1 deletions
diff --git a/Source/cmCallVisualStudioMacro.cxx b/Source/cmCallVisualStudioMacro.cxx
index 8011284..2476631 100644
--- a/Source/cmCallVisualStudioMacro.cxx
+++ b/Source/cmCallVisualStudioMacro.cxx
@@ -94,7 +94,41 @@ HRESULT InstanceCallMacro(
hr = vsIDE->Invoke(dispid, IID_NULL, LOCALE_USER_DEFAULT,
DISPATCH_METHOD, &params, &result, &excep, &arg);
- ReportHRESULT(hr, "Invoke(ExecuteCommand)");
+
+ std::ostringstream oss;
+ oss << std::endl;
+ oss << "Invoke(ExecuteCommand)" << std::endl;
+ oss << " Macro: " << macro.c_str() << std::endl;
+ oss << " Args: " << args.c_str() << std::endl;
+
+ if (DISP_E_EXCEPTION == hr)
+ {
+ oss << "DISP_E_EXCEPTION EXCEPINFO:" << excep.wCode << std::endl;
+ oss << " wCode: " << excep.wCode << std::endl;
+ oss << " wReserved: " << excep.wReserved << std::endl;
+ if (excep.bstrSource)
+ {
+ oss << " bstrSource: " <<
+ (const char*)(_bstr_t)excep.bstrSource << std::endl;
+ }
+ if (excep.bstrDescription)
+ {
+ oss << " bstrDescription: " <<
+ (const char*)(_bstr_t)excep.bstrDescription << std::endl;
+ }
+ if (excep.bstrHelpFile)
+ {
+ oss << " bstrHelpFile: " <<
+ (const char*)(_bstr_t)excep.bstrHelpFile << std::endl;
+ }
+ oss << " dwHelpContext: " << excep.dwHelpContext << std::endl;
+ oss << " pvReserved: " << excep.pvReserved << std::endl;
+ oss << " pfnDeferredFillIn: " << excep.pfnDeferredFillIn << std::endl;
+ oss << " scode: " << excep.scode << std::endl;
+ }
+
+ std::string exstr(oss.str());
+ ReportHRESULT(hr, exstr.c_str());
VariantClear(&result);
}