本文整理汇总了C++中ITypeInfo_Invoke函数的典型用法代码示例。如果您正苦于以下问题:C++ ITypeInfo_Invoke函数的具体用法?C++ ITypeInfo_Invoke怎么用?C++ ITypeInfo_Invoke使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ITypeInfo_Invoke函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: fw_apps_Invoke
static HRESULT WINAPI fw_apps_Invoke(
INetFwAuthorizedApplications *iface,
DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS *pDispParams,
VARIANT *pVarResult,
EXCEPINFO *pExcepInfo,
UINT *puArgErr )
{
fw_apps *This = impl_from_INetFwAuthorizedApplications( iface );
ITypeInfo *typeinfo;
HRESULT hr;
TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo( INetFwAuthorizedApplications_tid, &typeinfo );
if (SUCCEEDED(hr))
{
hr = ITypeInfo_Invoke( typeinfo, &This->INetFwAuthorizedApplications_iface, dispIdMember,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
ITypeInfo_Release( typeinfo );
}
return hr;
}
开发者ID:DusteDdk,项目名称:wine-multimedia,代码行数:27,代码来源:apps.c
示例2: typeinfo_invoke
static HRESULT typeinfo_invoke(DispatchEx *This, func_info_t *func, WORD flags, DISPPARAMS *dp, VARIANT *res,
EXCEPINFO *ei)
{
ITypeInfo *ti;
IUnknown *unk;
UINT argerr=0;
HRESULT hres;
hres = get_typeinfo(func->tid, &ti);
if(FAILED(hres)) {
ERR("Could not get type info: %08x\n", hres);
return hres;
}
hres = IUnknown_QueryInterface(This->outer, tid_ids[func->tid], (void**)&unk);
if(FAILED(hres)) {
ERR("Could not get iface %s: %08x\n", debugstr_mshtml_guid(tid_ids[func->tid]), hres);
return E_FAIL;
}
hres = ITypeInfo_Invoke(ti, unk, func->id, flags, dp, res, ei, &argerr);
IUnknown_Release(unk);
return hres;
}
开发者ID:Svyatpro,项目名称:winelastd3d10,代码行数:25,代码来源:dispex.c
示例3: queryresult_Invoke
static HRESULT WINAPI queryresult_Invoke(
IXMLDOMNodeList *iface,
DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS* pDispParams,
VARIANT* pVarResult,
EXCEPINFO* pExcepInfo,
UINT* puArgErr )
{
queryresult *This = impl_from_IXMLDOMNodeList( iface );
ITypeInfo *typeinfo;
HRESULT hr;
TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IXMLDOMNodeList_tid, &typeinfo);
if(SUCCEEDED(hr))
{
hr = ITypeInfo_Invoke(typeinfo, &(This->lpVtbl), dispIdMember, wFlags, pDispParams,
pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo);
}
return hr;
}
开发者ID:mikekap,项目名称:wine,代码行数:28,代码来源:queryresult.c
示例4: Host_Invoke
static HRESULT WINAPI Host_Invoke(IHost *iface, DISPID dispIdMember, REFIID riid,
LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
WINE_TRACE("(%d %p %p)\n", dispIdMember, pDispParams, pVarResult);
return ITypeInfo_Invoke(host_ti, iface, dispIdMember, wFlags, pDispParams,
pVarResult, pExcepInfo, puArgErr);
}
开发者ID:AlexSteel,项目名称:wine,代码行数:9,代码来源:host.c
示例5: FolderImpl_Invoke
static HRESULT WINAPI FolderImpl_Invoke(Folder3 *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
FolderImpl *This = impl_from_Folder(iface);
TRACE("(%p,%d,%p,%d,%u,%p,%p,%p,%p)\n", iface, dispIdMember, riid, lcid,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
return ITypeInfo_Invoke(This->iTypeInfo, This, dispIdMember, wFlags,
pDispParams, pVarResult, pExcepInfo, puArgErr);
}
开发者ID:PatroxGaurab,项目名称:wine,代码行数:12,代码来源:shelldispatch.c
示例6: MatchCollection2_Invoke
static HRESULT WINAPI MatchCollection2_Invoke(IMatchCollection2 *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
MatchCollection2 *This = impl_from_IMatchCollection2(iface);
TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
return ITypeInfo_Invoke(typeinfos[MatchCollection2_tid], iface, dispIdMember, wFlags,
pDispParams, pVarResult, pExcepInfo, puArgErr);
}
开发者ID:Dimillian,项目名称:wine,代码行数:12,代码来源:vbregexp.c
示例7: DispInvoke
/******************************************************************************
* DispInvoke (OLEAUT32.30)
*
* Call an object method using the information from its type library.
*
* RETURNS
* Success: S_OK.
* Failure: Returns DISP_E_EXCEPTION and updates pexcepinfo if an exception occurs.
* DISP_E_BADPARAMCOUNT if the number of parameters is incorrect.
* DISP_E_MEMBERNOTFOUND if the method does not exist.
* puArgErr is updated if a parameter error (see notes) occurs.
* Otherwise, returns the result of calling ITypeInfo_Invoke().
*
* NOTES
* Parameter errors include the following:
*| DISP_E_BADVARTYPE
*| E_INVALIDARG An argument was invalid
*| DISP_E_TYPEMISMATCH,
*| DISP_E_OVERFLOW An argument was valid but could not be coerced
*| DISP_E_PARAMNOTOPTIONAL A non optional parameter was not passed
*| DISP_E_PARAMNOTFOUND A parameter was passed that was not expected by the method
* This call defers to ITypeInfo_Invoke().
*/
HRESULT WINAPI DispInvoke(
VOID *_this, /* [in] Object to call method on */
ITypeInfo *ptinfo, /* [in] Object type info */
DISPID dispidMember, /* [in] DISPID of the member (e.g. from GetIDsOfNames()) */
USHORT wFlags, /* [in] Kind of method call (DISPATCH_ flags from "oaidl.h") */
DISPPARAMS *pparams, /* [in] Array of method arguments */
VARIANT *pvarResult, /* [out] Destination for the result of the call */
EXCEPINFO *pexcepinfo, /* [out] Destination for exception information */
UINT *puArgErr) /* [out] Destination for bad argument */
{
TRACE("\n");
return ITypeInfo_Invoke(ptinfo, _this, dispidMember, wFlags,
pparams, pvarResult, pexcepinfo, puArgErr);
}
开发者ID:RareHare,项目名称:reactos,代码行数:38,代码来源:dispatch.c
示例8: BaseControlVideoImpl_Invoke
HRESULT WINAPI BaseControlVideoImpl_Invoke(IBasicVideo *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
{
BaseControlVideo *This = impl_from_IBasicVideo(iface);
ITypeInfo *pTypeInfo;
HRESULT hr;
hr = BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, riid, 1, lcid, &pTypeInfo);
if (SUCCEEDED(hr))
{
hr = ITypeInfo_Invoke(pTypeInfo, &This->IBasicVideo_iface, dispIdMember, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
ITypeInfo_Release(pTypeInfo);
}
return hr;
}
开发者ID:AlexSteel,项目名称:wine,代码行数:15,代码来源:video.c
示例9: FolderImpl_Invoke
static HRESULT WINAPI FolderImpl_Invoke(Folder3 *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
FolderImpl *This = impl_from_Folder(iface);
ITypeInfo *ti;
HRESULT hr;
TRACE("(%p,%d,%p,%d,%u,%p,%p,%p,%p)\n", iface, dispIdMember, riid, lcid,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(Folder3_tid, &ti);
if (SUCCEEDED(hr))
hr = ITypeInfo_Invoke(ti, This, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
return hr;
}
开发者ID:Dimillian,项目名称:wine,代码行数:16,代码来源:shelldispatch.c
示例10: WebBrowser_Invoke
static HRESULT WINAPI WebBrowser_Invoke(IWebBrowser2 *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags,
DISPPARAMS *pDispParams, VARIANT *pVarResult,
EXCEPINFO *pExepInfo, UINT *puArgErr)
{
WebBrowser *This = impl_from_IWebBrowser2(iface);
ITypeInfo *typeinfo;
HRESULT hres;
TRACE("(%p)->(%d %s %d %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
hres = get_typeinfo(IWebBrowser2_tid, &typeinfo);
if(FAILED(hres))
return hres;
return ITypeInfo_Invoke(typeinfo, &This->IWebBrowser2_iface, dispIdMember, wFlags, pDispParams,
pVarResult, pExepInfo, puArgErr);
}
开发者ID:DusteDdk,项目名称:wine-multimedia,代码行数:19,代码来源:webbrowser.c
示例11: WshShell3_Invoke
static HRESULT WINAPI WshShell3_Invoke(IWshShell3 *iface, DISPID dispIdMember, REFIID riid, LCID lcid,
WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
ITypeInfo *typeinfo;
HRESULT hr;
TRACE("(%d %s %d %d %p %p %p %p)\n", dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IWshShell3_tid, &typeinfo);
if(SUCCEEDED(hr))
{
hr = ITypeInfo_Invoke(typeinfo, &WshShell3, dispIdMember, wFlags,
pDispParams, pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo);
}
return hr;
}
开发者ID:UIKit0,项目名称:wine-1,代码行数:19,代码来源:shell.c
示例12: dom_pi_Invoke
static HRESULT WINAPI dom_pi_Invoke(
IXMLDOMProcessingInstruction *iface,
DISPID dispIdMember, REFIID riid, LCID lcid,
WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult,
EXCEPINFO* pExcepInfo, UINT* puArgErr )
{
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
ITypeInfo *typeinfo;
HRESULT hr;
TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IXMLDOMProcessingInstruction_tid, &typeinfo);
if(SUCCEEDED(hr))
{
hr = ITypeInfo_Invoke(typeinfo, &This->IXMLDOMProcessingInstruction_iface, dispIdMember,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo);
}
return hr;
}
开发者ID:mikekap,项目名称:wine,代码行数:23,代码来源:pi.c
示例13: IEventListenerDemoImpl_Invoke
static HRESULT IEventListenerDemoImpl_Invoke(IEventListenerDemo *pThis, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
return ITypeInfo_Invoke(g_pTInfoIEventListener, (IDispatch *)pThis, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
}
开发者ID:svn2github,项目名称:virtualbox,代码行数:4,代码来源:tstCAPIGlue.c
示例14: test_TypeInfo
static void test_TypeInfo(void)
{
ITypeLib *pTypeLib;
ITypeInfo *pTypeInfo;
HRESULT hr;
static WCHAR wszBogus[] = { 'b','o','g','u','s',0 };
static WCHAR wszGetTypeInfo[] = { 'G','e','t','T','y','p','e','I','n','f','o',0 };
static WCHAR wszClone[] = {'C','l','o','n','e',0};
OLECHAR* bogus = wszBogus;
OLECHAR* pwszGetTypeInfo = wszGetTypeInfo;
OLECHAR* pwszClone = wszClone;
DISPID dispidMember;
DISPPARAMS dispparams;
hr = LoadTypeLib(wszStdOle2, &pTypeLib);
ok_ole_success(hr, LoadTypeLib);
hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_IFont, &pTypeInfo);
ok_ole_success(hr, ITypeLib_GetTypeInfoOfGuid);
/* test nonexistent method name */
hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &bogus, 1, &dispidMember);
ok(hr == DISP_E_UNKNOWNNAME,
"ITypeInfo_GetIDsOfNames should have returned DISP_E_UNKNOWNNAME instead of 0x%08x\n",
hr);
/* test invalid memberid */
dispparams.cNamedArgs = 0;
dispparams.cArgs = 0;
dispparams.rgdispidNamedArgs = NULL;
dispparams.rgvarg = NULL;
hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, 0xdeadbeef, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL);
ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr);
hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &pwszClone, 1, &dispidMember);
ok_ole_success(hr, ITypeInfo_GetIDsOfNames);
/* test correct memberid, but wrong flags */
hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL);
ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr);
/* test NULL dispparams */
hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, NULL, NULL, NULL, NULL);
ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr);
/* test dispparams->cNamedArgs being bigger than dispparams->cArgs */
dispparams.cNamedArgs = 1;
hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL);
ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr);
ITypeInfo_Release(pTypeInfo);
hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_IDispatch, &pTypeInfo);
ok_ole_success(hr, ITypeLib_GetTypeInfoOfGuid);
hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &pwszGetTypeInfo, 1, &dispidMember);
ok_ole_success(hr, ITypeInfo_GetIDsOfNames);
/* test invoking a method with a [restricted] keyword */
hr = ITypeInfo_Invoke(pTypeInfo, NULL, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL);
todo_wine {
ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr);
}
ITypeInfo_Release(pTypeInfo);
ITypeLib_Release(pTypeLib);
}
开发者ID:WASSUM,项目名称:longene_travel,代码行数:67,代码来源:typelib.c
示例15: DispatchEx_InvokeEx
static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp,
VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
{
DispatchEx *This = impl_from_IDispatchEx(iface);
IUnknown *unk;
ITypeInfo *ti;
dispex_data_t *data;
UINT argerr=0;
int min, max, n;
HRESULT hres;
TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
if(is_custom_dispid(id) && This->data->vtbl && This->data->vtbl->invoke)
return This->data->vtbl->invoke(This->outer, id, lcid, wFlags, pdp, pvarRes, pei);
if(wFlags == DISPATCH_CONSTRUCT) {
FIXME("DISPATCH_CONSTRUCT not implemented\n");
return E_NOTIMPL;
}
if(is_dynamic_dispid(id)) {
DWORD idx = id - DISPID_DYNPROP_0;
VARIANT *var;
if(!This->dynamic_data || This->dynamic_data->prop_cnt <= idx)
return DISP_E_UNKNOWNNAME;
var = &This->dynamic_data->props[idx].var;
switch(wFlags) {
case INVOKE_PROPERTYGET:
return VariantCopy(pvarRes, var);
case INVOKE_PROPERTYPUT:
VariantClear(var);
return VariantCopy(var, pdp->rgvarg);
default:
FIXME("unhandled wFlags %x\n", wFlags);
return E_NOTIMPL;
}
}
data = get_dispex_data(This);
if(!data)
return E_FAIL;
min = 0;
max = data->func_cnt-1;
while(min <= max) {
n = (min+max)/2;
if(data->funcs[n].id == id)
break;
if(data->funcs[n].id < id)
min = n+1;
else
max = n-1;
}
if(min > max) {
WARN("invalid id %x\n", id);
return DISP_E_UNKNOWNNAME;
}
hres = get_typeinfo(data->funcs[n].tid, &ti);
if(FAILED(hres)) {
ERR("Could not get type info: %08x\n", hres);
return hres;
}
hres = IUnknown_QueryInterface(This->outer, tid_ids[data->funcs[n].tid], (void**)&unk);
if(FAILED(hres)) {
ERR("Could not get iface: %08x\n", hres);
return E_FAIL;
}
hres = ITypeInfo_Invoke(ti, unk, id, wFlags, pdp, pvarRes, pei, &argerr);
ITypeInfo_Release(ti);
IUnknown_Release(unk);
return hres;
}
开发者ID:YokoZar,项目名称:wine,代码行数:84,代码来源:dispex.c
示例16: DispatchEx_InvokeEx
static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp,
VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
{
DispatchEx *This = impl_from_IDispatchEx(iface);
IUnknown *unk;
ITypeInfo *ti;
dispex_data_t *data;
UINT argerr=0;
int min, max, n;
HRESULT hres;
TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
if(This->data->vtbl && This->data->vtbl->invoke) {
hres = This->data->vtbl->invoke(This->outer, id, lcid, wFlags, pdp, pvarRes, pei);
if (hres != DISP_E_UNKNOWNNAME) return hres;
}
if(wFlags == DISPATCH_CONSTRUCT) {
FIXME("DISPATCH_CONSTRUCT not implemented\n");
return E_NOTIMPL;
}
data = get_dispex_data(This);
if(!data)
return E_FAIL;
min = 0;
max = data->func_cnt-1;
while(min <= max) {
n = (min+max)/2;
if(data->funcs[n].id == id)
break;
if(data->funcs[n].id < id)
min = n+1;
else
max = n-1;
}
if(min > max) {
WARN("invalid id %x\n", id);
return DISP_E_UNKNOWNNAME;
}
hres = get_typeinfo(data->funcs[n].tid, &ti);
if(FAILED(hres)) {
ERR("Could not get type info: %08x\n", hres);
return hres;
}
hres = IUnknown_QueryInterface(This->outer, get_riid_from_tid(data->funcs[n].tid), (void**)&unk);
if(FAILED(hres)) {
ERR("Could not get iface: %08x\n", hres);
ITypeInfo_Release(ti);
return E_FAIL;
}
if (is_propputref_id(id) && wFlags == DISPATCH_PROPERTYPUT)
wFlags = DISPATCH_PROPERTYPUTREF;
hres = ITypeInfo_Invoke(ti, unk, id, wFlags, pdp, pvarRes, pei, &argerr);
ITypeInfo_Release(ti);
IUnknown_Release(unk);
return hres;
}
开发者ID:AlexSteel,项目名称:wine,代码行数:68,代码来源:dispex.c
注:本文中的ITypeInfo_Invoke函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论