VARFLAGS 枚举

定义

标识定义变量属性的常量。Identifies the constants that define the properties of a variable.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class VARFLAGS
[System.Flags]
[System.Serializable]
public enum VARFLAGS
type VARFLAGS = 
Public Enum VARFLAGS
继承
VARFLAGS
属性

字段

VARFLAG_FBINDABLE 4

该变量支持数据绑定。The variable supports data binding.

VARFLAG_FDEFAULTBIND 32

该变量是最佳地表示此对象的唯一属性。The variable is the single property that best represents the object. 类型信息中仅有一个变量可以具有此特性。Only one variable in type information can have this attribute.

VARFLAG_FDEFAULTCOLLELEM 256

允许进行一种优化,使编译器查找“abc”类型上名为“xyz”的成员。Permits an optimization in which the compiler looks for a member named "xyz" on the type of "abc". 如果找到这样的成员,而且该成员标志为默认集合的某元素的访问函数,则生成对该成员函数的调用。If such a member is found and is flagged as an accessor function for an element of the default collection, then a call is generated to that member function. 可以对调度接口和接口中的成员使用;不能对模块使用。Permitted on members in dispinterfaces and interfaces; not permitted on modules.

VARFLAG_FDISPLAYBIND 16

该变量作为可绑定变量显示给用户。The variable is displayed to the user as bindable. 还必须设置 VARFLAG_FBINDABLEVARFLAG_FBINDABLE must also be set.

VARFLAG_FHIDDEN 64

尽管该变量存在并且是可绑定的,但不应在浏览器中将它显示给用户。The variable should not be displayed to the user in a browser, although it exists and is bindable.

VARFLAG_FIMMEDIATEBIND 4096

该变量作为单独的可绑定属性映射。The variable is mapped as individual bindable properties.

VARFLAG_FNONBROWSABLE 1024

该变量出现在对象浏览器而非属性浏览器中。The variable appears in an object browser, but not in a properties browser.

VARFLAG_FREADONLY 1

不应允许给该变量赋值。Assignment to the variable should not be allowed.

VARFLAG_FREPLACEABLE 2048

将该接口标记为具有默认行为。Tags the interface as having default behaviors.

VARFLAG_FREQUESTEDIT 8

设置后,任何直接更改该属性的尝试都会导致对 IPropertyNotifySink::OnRequestEdit 的调用。When set, any attempt to directly change the property results in a call to IPropertyNotifySink::OnRequestEdit. OnRequestEdit 的实现确定是否接受此更改。The implementation of OnRequestEdit determines if the change is accepted.

VARFLAG_FRESTRICTED 128

该变量不应该是可以从宏语言访问的。The variable should not be accessible from macro languages. 此标志用于系统级变量或不想让类型浏览器显示的变量。This flag is intended for system-level variables or variables that you do not want type browsers to display.

VARFLAG_FSOURCE 2

该变量返回一个对象,该对象为事件的源。The variable returns an object that is a source of events.

VARFLAG_FUIDEFAULT 512

该变量是用户界面中的默认显示。The variable is the default display in the user interface.

注解

有关的其他信息VARFLAGS, 请参阅 MSDN library。For additional information about VARFLAGS, see the MSDN Library.

当本机代码中的 COM 方法返回 HRESULT 时, 公共语言运行时将引发异常。The common language runtime throws an exception when a COM method in native code returns an HRESULT. 有关更多信息,请参见 How to: Map HRESULTs and ExceptionsFor more information, see How to: Map HRESULTs and Exceptions.

适用于