本文整理汇总了C++中debugstr_variant函数的典型用法代码示例。如果您正苦于以下问题:C++ debugstr_variant函数的具体用法?C++ debugstr_variant怎么用?C++ debugstr_variant使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了debugstr_variant函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TRACE
TRACE("(%p)->(%p %p)\n", This, in, out);
if(in) {
if(V_VT(in) == VT_I4) {
nsICommandParams *nsparam = create_nscommand_params();
char color_str[10];
sprintf(color_str, "#%02x%02x%02x",
V_I4(in)&0xff, (V_I4(in)>>8)&0xff, (V_I4(in)>>16)&0xff);
nsICommandParams_SetCStringValue(nsparam, NSSTATE_ATTRIBUTE, color_str);
do_ns_command(This, NSCMD_FONTCOLOR, nsparam);
nsICommandParams_Release(nsparam);
}else {
FIXME("unsupported forecolor %s\n", debugstr_variant(in));
}
update_doc(This, UPDATE_UI);
}
if(out) {
FIXME("unsupported out\n");
return E_NOTIMPL;
}
return S_OK;
}
static HRESULT exec_fontsize(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out)
{
示例2: HTMLDocument4_put_oncontrolselect
static HRESULT WINAPI HTMLDocument4_put_oncontrolselect(IHTMLDocument4 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
示例3: HTMLTableCell_put_height
static HRESULT WINAPI HTMLTableCell_put_height(IHTMLTableCell *iface, VARIANT v)
{
HTMLTableCell *This = impl_from_IHTMLTableCell(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
示例4: WebBrowser_GetProperty
static HRESULT WINAPI WebBrowser_GetProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT *pvtValue)
{
WebBrowser *This = WEBBROWSER_THIS(iface);
FIXME("(%p)->(%s %s)\n", This, debugstr_w(szProperty), debugstr_variant(pvtValue));
return E_NOTIMPL;
}
示例5: HTMLElement3_put_onmouseleave
static HRESULT WINAPI HTMLElement3_put_onmouseleave(IHTMLElement3 *iface, VARIANT v)
{
HTMLElement *This = impl_from_IHTMLElement3(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
示例6: HTMLEmbedElement_put_height
static HRESULT WINAPI HTMLEmbedElement_put_height(IHTMLEmbedElement *iface, VARIANT v)
{
HTMLEmbedElement *This = impl_from_IHTMLEmbedElement(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
示例7: OleControl_OnAmbientPropertyChange
static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID)
{
HTMLDocument *This = impl_from_IOleControl(iface);
IOleClientSite *client;
VARIANT res;
HRESULT hres;
client = This->doc_obj->client;
if(!client) {
TRACE("client = NULL\n");
return S_OK;
}
switch(dispID) {
case DISPID_AMBIENT_USERMODE:
TRACE("(%p)->(DISPID_AMBIENT_USERMODE)\n", This);
hres = get_client_disp_property(client, DISPID_AMBIENT_USERMODE, &res);
if(FAILED(hres))
return S_OK;
if(V_VT(&res) == VT_BOOL) {
if(V_BOOL(&res)) {
This->doc_obj->usermode = BROWSEMODE;
}else {
FIXME("edit mode is not supported\n");
This->doc_obj->usermode = EDITMODE;
}
}else {
FIXME("usermode=%s\n", debugstr_variant(&res));
}
return S_OK;
case DISPID_AMBIENT_DLCONTROL:
TRACE("(%p)->(DISPID_AMBIENT_DLCONTROL)\n", This);
return on_change_dlcontrol(This);
case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED:
TRACE("(%p)->(DISPID_AMBIENT_OFFLINEIFNOTCONNECTED)\n", This);
on_change_dlcontrol(This);
hres = get_client_disp_property(client, DISPID_AMBIENT_OFFLINEIFNOTCONNECTED, &res);
if(FAILED(hres))
return S_OK;
if(V_VT(&res) == VT_BOOL) {
if(V_BOOL(&res)) {
FIXME("offline connection is not supported\n");
hres = E_FAIL;
}
}else {
FIXME("offlineconnected=%s\n", debugstr_variant(&res));
}
return S_OK;
case DISPID_AMBIENT_SILENT:
TRACE("(%p)->(DISPID_AMBIENT_SILENT)\n", This);
on_change_dlcontrol(This);
hres = get_client_disp_property(client, DISPID_AMBIENT_SILENT, &res);
if(FAILED(hres))
return S_OK;
if(V_VT(&res) == VT_BOOL) {
if(V_BOOL(&res)) {
FIXME("silent mode is not supported\n");
hres = E_FAIL;
}
}else {
FIXME("silent=%s\n", debugstr_variant(&res));
}
return S_OK;
case DISPID_AMBIENT_USERAGENT:
TRACE("(%p)->(DISPID_AMBIENT_USERAGENT)\n", This);
hres = get_client_disp_property(client, DISPID_AMBIENT_USERAGENT, &res);
if(FAILED(hres))
return S_OK;
FIXME("not supported AMBIENT_USERAGENT\n");
hres = E_FAIL;
return S_OK;
case DISPID_AMBIENT_PALETTE:
TRACE("(%p)->(DISPID_AMBIENT_PALETTE)\n", This);
hres = get_client_disp_property(client, DISPID_AMBIENT_PALETTE, &res);
if(FAILED(hres))
return S_OK;
FIXME("not supported AMBIENT_PALETTE\n");
hres = E_FAIL;
return S_OK;
}
FIXME("(%p) unsupported dispID=%d\n", This, dispID);
return E_FAIL;
}
示例8: HTMLTableRow_put_borderColorDark
static HRESULT WINAPI HTMLTableRow_put_borderColorDark(IHTMLTableRow *iface, VARIANT v)
{
HTMLTableRow *This = impl_from_IHTMLTableRow(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
示例9: regtask_Run
static HRESULT WINAPI regtask_Run(IRegisteredTask *iface, VARIANT params, IRunningTask **task)
{
FIXME("%p,%s,%p: stub\n", iface, debugstr_variant(¶ms), task);
return E_NOTIMPL;
}
示例10: 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);
HRESULT hres;
TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
if(wFlags == (DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF))
wFlags = DISPATCH_PROPERTYPUT;
switch(get_dispid_type(id)) {
case DISPEXPROP_CUSTOM:
if(!This->data->vtbl || !This->data->vtbl->invoke)
return DISP_E_UNKNOWNNAME;
return This->data->vtbl->invoke(This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
case DISPEXPROP_DYNAMIC: {
DWORD idx = id - DISPID_DYNPROP_0;
dynamic_prop_t *prop;
if(!get_dynamic_data(This) || This->dynamic_data->prop_cnt <= idx)
return DISP_E_UNKNOWNNAME;
prop = This->dynamic_data->props+idx;
switch(wFlags) {
case DISPATCH_METHOD|DISPATCH_PROPERTYGET:
if(!pvarRes)
return E_INVALIDARG;
/* fall through */
case DISPATCH_METHOD:
if(V_VT(&prop->var) != VT_DISPATCH) {
FIXME("invoke %s\n", debugstr_variant(&prop->var));
return E_NOTIMPL;
}
return invoke_disp_value(This, V_DISPATCH(&prop->var), lcid, wFlags, pdp, pvarRes, pei, pspCaller);
case DISPATCH_PROPERTYGET:
if(prop->flags & DYNPROP_DELETED)
return DISP_E_UNKNOWNNAME;
V_VT(pvarRes) = VT_EMPTY;
return variant_copy(pvarRes, &prop->var);
case DISPATCH_PROPERTYPUT:
if(pdp->cArgs != 1 || (pdp->cNamedArgs == 1 && *pdp->rgdispidNamedArgs != DISPID_PROPERTYPUT)
|| pdp->cNamedArgs > 1) {
FIXME("invalid args\n");
return E_INVALIDARG;
}
TRACE("put %s\n", debugstr_variant(pdp->rgvarg));
VariantClear(&prop->var);
hres = variant_copy(&prop->var, pdp->rgvarg);
if(FAILED(hres))
return hres;
prop->flags &= ~DYNPROP_DELETED;
return S_OK;
default:
FIXME("unhandled wFlags %x\n", wFlags);
return E_NOTIMPL;
}
}
case DISPEXPROP_BUILTIN:
if(wFlags == DISPATCH_CONSTRUCT) {
if(id == DISPID_VALUE) {
if(This->data->vtbl && This->data->vtbl->value) {
return This->data->vtbl->value(This, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
}
FIXME("DISPATCH_CONSTRUCT flag but missing value function\n");
return E_FAIL;
}
FIXME("DISPATCH_CONSTRUCT flag without DISPID_VALUE\n");
return E_FAIL;
}
return invoke_builtin_prop(This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
default:
assert(0);
return E_FAIL;
}
}
示例11: HTMLElementCollection_item
static HRESULT WINAPI HTMLElementCollection_item(IHTMLElementCollection *iface,
VARIANT name, VARIANT index, IDispatch **pdisp)
{
HTMLElementCollection *This = impl_from_IHTMLElementCollection(iface);
HRESULT hres = S_OK;
TRACE("(%p)->(%s %s %p)\n", This, debugstr_variant(&name), debugstr_variant(&index), pdisp);
*pdisp = NULL;
switch(V_VT(&name)) {
case VT_I4:
if(V_I4(&name) < 0)
return E_INVALIDARG;
hres = get_item_idx(This, V_I4(&name), pdisp);
break;
case VT_UINT:
hres = get_item_idx(This, V_UINT(&name), pdisp);
break;
case VT_BSTR: {
DWORD i;
if(V_VT(&index) == VT_I4) {
LONG idx = V_I4(&index);
if(idx < 0)
return E_INVALIDARG;
for(i=0; i<This->len; i++) {
if(is_elem_name(This->elems[i], V_BSTR(&name)) && !idx--)
break;
}
if(i != This->len) {
*pdisp = (IDispatch*)&This->elems[i]->IHTMLElement_iface;
IDispatch_AddRef(*pdisp);
}
}else {
elem_vector_t buf = {NULL, 0, 8};
buf.buf = heap_alloc(buf.size*sizeof(HTMLElement*));
for(i=0; i<This->len; i++) {
if(is_elem_name(This->elems[i], V_BSTR(&name))) {
node_addref(&This->elems[i]->node);
elem_vector_add(&buf, This->elems[i]);
}
}
if(buf.len > 1) {
elem_vector_normalize(&buf);
*pdisp = (IDispatch*)HTMLElementCollection_Create(buf.buf, buf.len);
}else {
if(buf.len == 1) {
/* Already AddRef-ed */
*pdisp = (IDispatch*)&buf.buf[0]->IHTMLElement_iface;
}
heap_free(buf.buf);
}
}
break;
}
default:
FIXME("Unsupported name %s\n", debugstr_variant(&name));
hres = E_NOTIMPL;
}
if(SUCCEEDED(hres))
TRACE("returning %p\n", *pdisp);
return hres;
}
示例12: function_invoke
static HRESULT function_invoke(DispatchEx *This, func_info_t *func, WORD flags, DISPPARAMS *dp, VARIANT *res,
EXCEPINFO *ei, IServiceProvider *caller)
{
HRESULT hres;
switch(flags) {
case DISPATCH_METHOD|DISPATCH_PROPERTYGET:
if(!res)
return E_INVALIDARG;
/* fall through */
case DISPATCH_METHOD:
if(This->dynamic_data && This->dynamic_data->func_disps
&& This->dynamic_data->func_disps[func->func_disp_idx].func_obj) {
func_obj_entry_t *entry = This->dynamic_data->func_disps + func->func_disp_idx;
if(V_VT(&entry->val) != VT_DISPATCH) {
FIXME("calling %s not supported\n", debugstr_variant(&entry->val));
return E_NOTIMPL;
}
if((IDispatch*)&entry->func_obj->dispex.IDispatchEx_iface != V_DISPATCH(&entry->val)) {
if(!V_DISPATCH(&entry->val)) {
FIXME("Calling null\n");
return E_FAIL;
}
hres = invoke_disp_value(This, V_DISPATCH(&entry->val), 0, flags, dp, res, ei, NULL);
break;
}
}
if(func->call_vtbl_off)
hres = invoke_builtin_function(This, func, dp, res, caller);
else
hres = typeinfo_invoke(This, func, flags, dp, res, ei);
break;
case DISPATCH_PROPERTYGET: {
func_obj_entry_t *entry;
if(func->id == DISPID_VALUE) {
BSTR ret;
ret = SysAllocString(objectW);
if(!ret)
return E_OUTOFMEMORY;
V_VT(res) = VT_BSTR;
V_BSTR(res) = ret;
return S_OK;
}
hres = get_func_obj_entry(This, func, &entry);
if(FAILED(hres))
return hres;
V_VT(res) = VT_EMPTY;
return VariantCopy(res, &entry->val);
}
case DISPATCH_PROPERTYPUT: {
func_obj_entry_t *entry;
if(dp->cArgs != 1 || (dp->cNamedArgs == 1 && *dp->rgdispidNamedArgs != DISPID_PROPERTYPUT)
|| dp->cNamedArgs > 1) {
FIXME("invalid args\n");
return E_INVALIDARG;
}
/*
* NOTE: Although we have IDispatchEx tests showing, that it's not allowed to set
* function property using InvokeEx, it's possible to do that from jscript.
* Native probably uses some undocumented interface in this case, but it should
* be fine for us to allow IDispatchEx handle that.
*/
hres = get_func_obj_entry(This, func, &entry);
if(FAILED(hres))
return hres;
return VariantCopy(&entry->val, dp->rgvarg);
}
default:
FIXME("Unimplemented flags %x\n", flags);
hres = E_NOTIMPL;
}
return hres;
}
示例13: OmHistory_go
static HRESULT WINAPI OmHistory_go(IOmHistory *iface, VARIANT *pvargdistance)
{
OmHistory *This = impl_from_IOmHistory(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(pvargdistance));
return E_NOTIMPL;
}
示例14: HTMLTableRow_put_borderColorLight
static HRESULT WINAPI HTMLTableRow_put_borderColorLight(IHTMLTableRow *iface, VARIANT v)
{
HTMLTableRow *This = HTMLTABLEROW_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
示例15: HTMLDocument5_put_onmousewheel
static HRESULT WINAPI HTMLDocument5_put_onmousewheel(IHTMLDocument5 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}