gusucode.com > 《精通matlab 7》包括配套光盘 > 配套光盘里的程序附件/Ex-37/com_test4/com_test_1_0.cpp
// Machine generated IDispatch wrapper class(es) created with ClassWizard #include "stdafx.h" #include "com_test_1_0.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // Icom_testclass properties ///////////////////////////////////////////////////////////////////////////// // Icom_testclass operations LPDISPATCH Icom_testclass::GetMWFlags() { LPDISPATCH result; InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); return result; } void Icom_testclass::SetMWFlags(LPDISPATCH newValue) { static BYTE parms[] = VTS_DISPATCH; InvokeHelper(0x1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue); } void Icom_testclass::plot_test() { InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); } void Icom_testclass::property_test(long nargout, VARIANT* result) { static BYTE parms[] = VTS_I4 VTS_PVARIANT; InvokeHelper(0x3, DISPATCH_METHOD, VT_EMPTY, NULL, parms, nargout, result); } VARIANT Icom_testclass::GetA() { VARIANT result; InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL); return result; } void Icom_testclass::SetA(const VARIANT& newValue) { static BYTE parms[] = VTS_VARIANT; InvokeHelper(0x4, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, &newValue); }