IMcObjectsRegisterInterfaceClassFactory Method
|
|
Registers information necessary to instantiate an interface
as a new McObjMgr type.
Namespace:
MediaCy.IQL.ObjectManager
Assembly:
MediaCy.IQL.ObjectManager (in MediaCy.IQL.ObjectManager.dll) Version: 10.0.6912.0
SyntaxFunction RegisterInterfaceClassFactory (
bstrTypeName As String,
varClassFactory As Object,
varInterfaceIID As Object,
Optional eControlFlags As mcobjClassFactoryFlags = mcobjClassFactoryFlags.mcobjClassFactoryDefault,
<OptionalAttribute> varBasetypeNameorEnum As Object
) As Integer
Parameters
- bstrTypeName
- Type: SystemString
[in] Name of the new type. This name must not conflict
any other name in its namespace. Unless the name is supplied using the "::"
syntax (e.g., "MyNamespace::MyTypeName", the namespace used is the current
default Namespace of this instance of the McObjects collection ("McOM" unless
the Namespace property has been changed). - varClassFactory
- Type: SystemObject
[in] The class factory. This may be a VT_BSTR in
which case the it must be the CLSID string of the CoClass in the form
"{12345678-1234-1234-1234-123456789ABC}" or the ProgID (if the string does
not start with a '{'). If it is a VT_UNKNOWN, then it is assumed to be the
IClassFactory interface pointer itself. - varInterfaceIID
- Type: SystemObject
[in] The interface IID. This may be a VT_BSTR in
which case the it must be the IID string of the form
"{12345678-1234-1234-1234-123456789ABC}". If it is a VT_UNKNOWN, then it is
assumed to be an instance of the interface pointer itself; all objects Added
of this type will have this interface as their data. - eControlFlags (Optional)
- Type: MediaCy.IQL.ObjectManagermcobjClassFactoryFlags
mcobjClassFactoryFlags [in,
defaultvalue(mcobjClassFactoryEachNew)] This optional flag controls whether
multiple instances of the interface are created, or if the first created
instance is to be used. - varBasetypeNameorEnum (Optional)
- Type: SystemObject
Return Value
Type:
Int32A new 32bit integral mcobjTypeEnum for the type. The type name will be the
bstrTypeName.
RemarksOnce registered, an McObject of this interface type created by
the McObjects::Add method will have as its Value an IInterface* which implements
the interface. The McObject.Interface property will allow you to access this
interface. Use the UnregisterType method to unregister a type.
Note that Type ID values are always 32bit integer values (C++ type long);
this differs from Category and Notify cookie values, which must be
typed as a COOKIE_HANDLE (C++ type size_t).
You cannot UnregisterType any registered class factory for which any
objects of that type still exist.
See Also