Home COM GDI+ WebBrowser Data Access 

COM Fundamentals

 

Enumerations and Constants

 

ACTRL_ACCESS_XXX

APPTYPE

BINDFLAGS

BINDSPEED

BSCO_OPTION

CALLFRAME_COPY

CALLFRAME_FREE
CALLFRAME_WALK

CALLTYPE

CLSCTX

COINIT

COWAIT_FLAGS

EOC_ChangeType

EOLE_AUTHENTICATION_CAPABILITIES

EXTCONN

 

 

MKRREDUCE

MKSYS

MSHCTX

MSHLFLAGS

PENDINGMSG

PENDINGTYPE

REGCLS

RPC_C_AUTHN_XXX

RPC_C_AUTHN_LEVEL_XXX

RPC_C_AUTHZ_XXX

RPC_C_IMP_LEVEL_XXX

SERVERCALL

THDTYPE

TYSPEC

 

ACTRL_ACCESS_XXX constants

 

These values indicate whether an entry in the access list describes rights that are allowed or denied.
 

 

%ACTRL_ACCESS_ALLOWED = &H00000000
%ACTRL_ACCESS_DENIED = &H10000000
 

 

APPTYPE Enumeration

 

The APTTYPE enumeration values indicate different types of apartments.
 

 

%APTTYPE_CURRENT = -1
%APTTYPE_STA = 0
%APTTYPE_MTA = 1
%APTTYPE_NA = 2
%APTTYPE_MAINSTA = 3
 

 

BIND_FLAGS Enumeration

 

The BIND_FLAGS enumeration values are used to control aspects of moniker binding operations. The values are used in the BIND_OPTS structure. Callers of IMoniker methods can specify values from this enumeration, and implementers of IMoniker methods can use these values in determining what they should do.
 

 

%BIND_MAYBOTHERUSER = 1
%BIND_JUSTTESTEXISTENCE = 2
 

 

BINDSPEED Enumeration

 

The BINDSPEED enumeration values indicate approximately how long the caller will wait to bind to an object. Callers of the IOleItemContainer::GetObject method specify values from this enumeration, and implementers of that method use these values as a guideline for how quickly they must complete their operation.
 

 

%BINDSPEED_INDEFINITE = 1
%BINDSPEED_MODERATE = 2
%BINDSPEED_IMMEDIATE = 3
 

 

BSCO_OPTION Enumeration

 

A client of a binding operation provides values from the BSCO_OPTION enumeration when calling the RegisterBindStatusCallback function to register the client's IBindStatusCallback Interface. The BSCO_OPTION values specify the callback notifications that the client wants from the moniker. The values correspond to methods in the IBindStatusCallback interface. Simple clients of IMoniker::BindToStorage that want nothing but the data bits need specify only BSCO_ONDATAAVAILABLE.
 

 

%BSCO_ONSTARTBINDING = 0
%BSCO_GETPRIORITY = 1
%BSCO_ONLOWRESOURCE = 2
%BSCO_ONPROGRESS = 3
%BSCO_ONSTOPBINDING = 4
%BSCO_GETBINDINFO = 5
%BSCO_ONDATAAVAILABLE = 6
%BSCO_ONOBJECTAVAILABLE = 7
%BSCO_ALLONIBSC = 8
 

 

CALLFRAME_COPY Enumeration

 

This enumeration is used with ICallFrame::Copy to determine if the copied call frame data can be shared with data in the parent frame by determining its lifetime dependency on the parent frame. If the CALLFRAME_COPY_NESTED flag is set then the client will be responsible for using the copied call frame in a manner that its lifetime is nested in the lifetime of its parent frame making the data shareable. If the CALLFRAME_COPY_INDEPENDENT is set then the lifetime of the copied frame will be independent of the parents.
 

 

%CALLFRAME_COPY_NESTED = 1
%CALLFRAME_COPY_INDEPENDENT = 2
 

 

CALLFRAME_FREE Enumeration

 

This enumeration is used with ICallFrame::Free to determine the parameter type to be freed.
 

 

%CALLFRAME_FREE_NONE = 0
%CALLFRAME_FREE_IN = 1
%CALLFRAME_FREE_INOUT = 2
%CALLFRAME_FREE_OUT = 4
%CALLFRAME_FREE_TOP_INOUT = 8
%CALLFRAME_FREE_TOP_OUT = 16
%CALLFRAME_FREE_ALL = 31
 

 

CALLFRAME_WALK Enumeration

 

This enumeration is used with ICallFrame::WalkFrame to determine the parameter type to be walked.
 

 

%CALLFRAME_WALK_IN = 1
%CALLFRAME_WALK_INOUT = 2
%CALLFRAME_WALK_OUT = 4
 

 

CALLTYPE Enumeration

 

The CALLTYPE enumeration constant specifies the call types used by IMessageFilter::HandleInComingCall.
 

 

%CALLTYPE_TOPLEVEL = 1
%CALLTYPE_NESTED = 2
%CALLTYPE_ASYNC = 3
%CALLTYPE_TOPLEVEL_CALLPENDING = 4
%CALLTYPE_ASYNC_CALLPENDING = 5
 

 

CLSCTX Enumeration

 

Values from the CLSCTX enumeration are used in activation calls to indicate the execution contexts in which an object is to be run. These values are also used in calls to CoRegisterClassObject to indicate the set of execution contexts in which a class object is to be made available for requests to construct instances.
 

 

%CLSCTX_INPROC_SERVER = &H1
%CLSCTX_INPROC_HANDLER = &H2
%CLSCTX_LOCAL_SERVER = &H4
%CLSCTX_INPROC_SERVER16 = &H8
%CLSCTX_REMOTE_SERVER = &H10
%CLSCTX_INPROC_HANDLER16 = &H20
%CLSCTX_RESERVED1 = &H40
%CLSCTX_RESERVED2 = &H80
%CLSCTX_RESERVED3 = &H100
%CLSCTX_RESERVED4 = &H200
%CLSCTX_NO_CODE_DOWNLOAD = &H400
%CLSCTX_RESERVED5 = &H800
%CLSCTX_NO_CUSTOM_MARSHAL = &H1000
%CLSCTX_ENABLE_CODE_DOWNLOAD = &H2000
%CLSCTX_NO_FAILURE_LOG = &H4000
%CLSCTX_DISABLE_AAA = &H8000
%CLSCTX_ENABLE_AAA = &H10000
%CLSCTX_FROM_DEFAULT_CONTEXT = &H20000
%CLSCTX_ACTIVATE_32_BIT_SERVER = &H40000
%CLSCTX_ACTIVATE_64_BIT_SERVER = &H80000

%CLSCTX_INPROC = %CLSCTX_INPROC_SERVER OR %CLSCTX_INPROC_HANDLER
%CLSCTX_SERVER = %CLSCTX_INPROC_SERVER OR %CLSCTX_LOCAL_SERVER OR %CLSCTX_REMOTE_SERVER
%CLSCTX_ALL = %CLSCTX_INPROC_SERVER OR %CLSCTX_INPROC_HANDLER OR %CLSCTX_LOCAL_SERVER OR %CLSCTX_REMOTE_SERVER
 

 

COINIT Enumeration

 

A set of values from the COINIT enumeration is passed as the dwCoInit parameter to CoInitializeEx. This value determines the concurrency model used for incoming calls to objects created by this thread. This concurrency model can be either apartment-threaded or multi-threaded.
 

 

%COINIT_MULTITHREADED = &H0
%COINIT_APARTMENTTHREADED = &H2
%COINIT_DISABLE_OLE1DDE = &H4
%COINIT_SPEED_OVER_MEMORY = &H8
 

 

COWAIT_FLAGS Enumeration

 

The values of the COWAIT_FLAGS enumeration specify the behavior of the CoWaitForMultipleHandles function. This enumeration is also used by the ISynchronize::Wait and ISynchronizeContainer::WaitMultiple methods, which typically call CoWaitForMultipleHandles.
 

 

%COWAIT_WAITALL = &H00000001
%COWAIT_ALERTABLE = &H00000002
 

 

EOC_ChangeType Enumeration

 

The EOC_ChangeType enumeration constants indicate the nature of the change to an event object. Values from this enumeration are passed to methods of the IEventObjectChange interface.
 

 

%EOC_NewObject = 0
%EOC_ModifiedObject = 1
%EOC_DeletedObject = 2
 

 

EOLE_AUTHENTICATION_CAPABILITIES Enumeration

 

The EOLE_AUTHENTICATION_CAPABILITIES enumeration constants set various capabilities in CoInitializeSecurity and IClientSecurity::SetBlanket (or its helper function CoSetProxyBlanket).
 

 

%EOAC_NONE = &H0
%EOAC_MUTUAL_AUTH = &H1
%EOAC_SECURE_REFS = &H2
%EOAC_ACCESS_CONTROL = &H4
%EOAC_APPID = &H8
%EOAC_DYNAMIC = &H10
%EOAC_STATIC_CLOAKING = &H20
%EOAC_DYNAMIC_CLOAKING = &H40
%EOAC_ANY_AUTHORITY = &H80
%EOAC_MAKE_FULLSIC = &H100
%EOAC_REQUIRE_FULLSIC = &H200
%EOAC_AUTO_IMPERSONATE = &H400
%EOAC_DEFAULT = &H800
%EOAC_DISABLE_AAA = &H1000
%EOAC_NO_CUSTOM_MARSHAL = &H2000
 

 

EXTCONN Enumeration

 

The EXTCONN enumeration specifies the type of external connection existing on an embedded object. Currently, the only supported type is EXTCONN_STRONG, meaning that the external connection is a link. This EXTCONN constant is used in the IExternalConnection::AddConnection and IExternalConnection::ReleaseConnection methods.
 

 

%EXTCONN_STRONG = &H0001
%EXTCONN_WEAK = &H0002
%EXTCONN_CALLABLE = &H0004
 

 

MKRREDUCE Enumeration

 

The MKRREDUCE enumeration constants are used to specify how far the moniker should be reduced. They are used in the IMoniker::Reduce method.
 

 

%MKRREDUCE_ONE = 196608 ' 3<<16
%MKRREDUCE_TOUSER = 131072 ' 2<<16
%MKRREDUCE_THROUGHUSER = 65536 ' 1<<16
%MKRREDUCE_ALL = 0
 

 

MKSYS Enumeration

 

The MKSYS enumeration constants indicate the moniker's class. They are returned from the IMoniker::IsSystemMoniker method. MKSYS is defined in Objidl.h.

 

 

%MKSYS_NONE = 0
%MKSYS_GENERICCOMPOSITE = 1
%MKSYS_FILEMONIKER = 2
%MKSYS_ANTIMONIKER = 3
%MKSYS_ITEMMONIKER = 4
%MKSYS_POINTERMONIKER = 5
%MKSYS_CLASSMONIKER = 7
 

 

MSHCTX Enumeration

 

The MSHCTX enumeration constants specify the destination context, which is the process in which the unmarshaling is to be done. These flags are used in the IMarshal and IStdMarshalInfo interfaces and in the CoMarshalInterface and CoGetStandardMarshal functions.

 

 

%MSHCTX_LOCAL = 0
%MSHCTX_NOSHAREDMEM = 1
%MSHCTX_DIFFERENTMACHINE = 2
%MSHCTX_INPROC = 3
 

 

MSHLFLAGS Enumeration

 

The MSHLFLAGS enumeration constants determine why the marshaling is to be done. These flags are used in the IMarshal interface and the CoMarshalInterface and CoGetStandardMarshal functions.

 

 

%MSHLFLAGS_NORMAL = 0
%MSHLFLAGS_TABLESTRONG = 1
%MSHLFLAGS_TABLEWEAK = 2
%MSHLFLAGS_NOPING = 3
 

 

PENDINGMSG Enumeration

 

The PENDINGMSG enumeration constants are return values of IMessageFilter::MessagePending.

 

 

%PENDINGMSG_CANCELCALL = 0
%PENDINGMSG_WAITNOPROCESS = 1
%PENDINGMSG_WAITDEFPROCESS = 2
 

 

PENDINGTYPE Enumeration

 

The PENDINGTYPE enumeration constants indicate the level of nesting in the IMessageFilter::MessagePending method.

 

 

%PENDINGTYPE_TOPLEVEL = 1
%PENDINGTYPE_NESTED = 2
 

 

RPC_C_AUTHN_XXX constants

 

These values specify authentication services by identifying the security package that provides the service, such as NTLMSSP, Kerberos, or SChannel. They are used in the SOLE_AUTHENTICATION_SERVICE and the SOLE_AUTHENTICATION_INFO structures. The SOLE_AUTHENTICATION_SERVICE structure is passed by the server to the CoInitializeSecurity function and can be retrieved by the CoQueryAuthenticationServices function. A pointer to a SOLE_AUTHENTICATION_INFO structure is passed by the client to the CoInitializeSecurity function. For more information on the security packages identified by these values, such as NTLMSSP and Kerberos, see COM and Security Packages.
 

 

%RPC_C_AUTHN_NONE = 0
%RPC_C_AUTHN_DCE_PRIVATE = 1
%RPC_C_AUTHN_DCE_PUBLIC = 2
%RPC_C_AUTHN_DEC_PUBLIC = 4
%RPC_C_AUTHN_GSS_NEGOTIATE = 9
%RPC_C_AUTHN_WINNT = 10
%RPC_C_AUTHN_GSS_SCHANNEL = 14
%RPC_C_AUTHN_GSS_KERBEROS = 16
%RPC_C_AUTHN_MSN = 17
%RPC_C_AUTHN_DPA = 18
%RPC_C_AUTHN_MQ = 100
%RPC_C_AUTHN_DEFAULT = &HFFFFFFFF&
 

 

RPC_C_AUTHN_LEVEL_XXX constants

 

Used in the security functions and interfaces to specify an authentication level, which indicates the amount of authentication provided to help protect the integrity of the data. Each level includes the protection provided by the previous levels.
 

 

%RPC_C_AUTHN_LEVEL_DEFAULT = 0
%RPC_C_AUTHN_LEVEL_NONE = 1
%RPC_C_AUTHN_LEVEL_CONNECT = 2
%RPC_C_AUTHN_LEVEL_CALL = 3
%RPC_C_AUTHN_LEVEL_PKT = 4
%RPC_C_AUTHN_LEVEL_PKT_INTEGRITY = 5
%RPC_C_AUTHN_LEVEL_PKT_PRIVACY = 6
 

 

RPC_C_AUTHZ_XXX constants

 

These values define what the server authorizes, and they are used by methods of the IClientSecurity interface. They are used in the SOLE_AUTHENTICATION_SERVICE structure, which is retrieved by the CoQueryAuthenticationServices function. The RPC_C_AUTHZ_xxx values are also used in the SOLE_AUTHENTICATION_INFO structure, which in turn is a member of the SOLE_AUTHENTICATION_LIST structure. This structure, which is a list of authentication services, the authorization services they perform, and the authentication information for each service, is passed to the CoInitializeSecurity function and the IClientSecurity::SetBlanket method.
 

 

%RPC_C_AUTHZ_NONE = 0
%RPC_C_AUTHZ_NAME = 1
%RPC_C_AUTHZ_DCE = 2
%RPC_C_AUTHZ_DEFAULT = &HFFFFFFFF
 

 

RPC_C_IMP_LEVEL_XXX constants

 

Used in the security functions and interfaces to specify an impersonation level, which indicates the amount of authority given to the server when it is impersonating the client.
 

 

%RPC_C_IMP_LEVEL_DEFAULT = 0
%RPC_C_IMP_LEVEL_ANONYMOUS = 1
%RPC_C_IMP_LEVEL_IDENTIFY = 2
%RPC_C_IMP_LEVEL_IMPERSONATE = 3
%RPC_C_IMP_LEVEL_DELEGATE = 4
 

 

REGCLS Enumeration

 

The REGCLS enumeration defines values used in CoRegisterClassObject to control the type of connections to a class object.

 

 

%REGCLS_SINGLEUSE = 0
%REGCLS_MULTIPLEUSE = 1
%REGCLS_MULTI_SEPARATE = 2
%REGCLS_SUSPENDED = 4
%REGCLS_SURROGATE = 8
 

 

SERVERCALL Enumeration

 

The SERVERCALL enumeration constants indicate the status of server call — returned by IMessageFilter::HandleInComingCall and passed to IMessageFilter::RetryRejectedCall.

 

 

%SERVERCALL_ISHANDLED = 0
%SERVERCALL_REJECTED = 1
%SERVERCALL_RETRYLATER = 2
 

 

THDTYPE Enumeration

 

The THDTYPE enumeration constants indicate whether a particular thread supports a message loop.

 

 

%THDTYPE_BLOCKMESSAGES = 0
%THDTYPE_PROCESSMESSAGES = 1
 

 

TYSPEC Enumeration

 

The TYSPEC enumeration and uCLSSPEC union provide ways of mapping to a Class ID.

 

 

%TYSPEC_CLSID = 0
%TYSPEC_FILEEXT = 1
%TYSPEC_MIMETYPE = 2
%TYSPEC_FILENAME = 3
%TYSPEC_PROGID = 4
%TYSPEC_PACKAGENAME = 5
%TYSPEC_OBJECTID = 6
 

 

Page last updated on Friday, 16 June 2006 09:07:50 +0200