Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
COM
id
in
int
odl
out
ptr
ref
Expand Minimize

nonbrowsable attribute

Use the [nonbrowsable] attribute to tag an interface or dispinterface member that should not be displayed in a properties browser.


[property-attribute-list, nonbrowsable]return-type property-name(prop-param-list)

Parameters

property-attribute-list

Other attributes that apply to the property.

return-type

The type of the data returned by the method.

property-name

The name of the property or method.

prop-param-list

Zero or more parameters to be passed to the method.

Remarks

Certain properties should not be displayed in a properties browser. This may be because retrieving the value would take a very long time. The example prevents the user from attempting to retrieve the Count property, which returns the number of rows in the dynaset.This number may represent the results of a very large query.

Other properties may have unexpected effects on the browser. For example, consider a control with the property "IsSelected" to tell whether the control is selected. If "IsSelected" is set to false, a selection-based properties browser will browse a different object.

Note that a property tagged as [nonbrowsable] will still appear in an object browser, which does not show property values.

Typeflag Representation

The presence of FUNCFLAG_FNONBROWSABLE or VARFLAG_FNONBROWSABLE.

Examples

[
    dual,
    uuid(12345678-1234-1234-1234-123456789ABC),
    restricted
]
interface IDynaset:IDispatch
{
    [propget, nonbrowsable]HRESULT Count([out, retval] long *Value);
}

See also

ODL File Syntax
ODL File Example
Generating a Type Library With MIDL

 

 

Community Additions

ADD
Show:
© 2015 Microsoft