我应用Invoke在C ++中使用应用程序的对象但是发生了错误。 错误:信息不可用,没有为GPNSAutomation.dll加载符号 我的代码是:
::CLSIDFromProgID(OLESTR("SGNSAutomation.SGNSApplication"), &clsid);
IID iid;
HRESULT hr = CoCreateInstance(clsid, NULL, CLSCTX_ALL,
IID_IDispatch, (LPVOID*)&pWMPDispatch);
IDispatch * pdisp = (IDispatch *)NULL;
DISPID dispid;
DISPPARAMS params= {NULL,NULL,0,0};
params.cArgs =1;
OLECHAR * Name = OLESTR("importCase");
HRESULT hresult =pWMPDispatch->GetIDsOfNames(IID_NULL,
&Name,1,LOCALE_SYSTEM_DEFAULT,&dispid);
hresult =pWMPDispatch->Invoke(dispid, IID_NULL, LOCALE_USER_DEFAULT,
DISPATCH_METHOD, ¶ms, NULL, NULL,
NULL);
_ASSERT(hr==S_OK);