IMcOMGlobalMcObjectTemp Method
|
|
Returns a "temporary" IMcObject that contains given source data.
Namespace:
MediaCy.IQL.ObjectManager
Assembly:
MediaCy.IQL.ObjectManager (in MediaCy.IQL.ObjectManager.dll) Version: 10.0.6912.0
SyntaxFunction McObjectTemp (
varValue As Object
) As McObject
Parameters
- varValue
- Type: SystemObject
[in] An intial value to be assigned to the object. The
type of this argument determines the type of the object. The varValue
VARIANT must not be empty. Any default Value of an object source will be
used as the source data.
Return Value
Type:
McObjectA McObject instance. If varValue already holds an McObject, then that
is returned. Otherwise a new McObject instance is returned; this instance will
not be part of the McObjects collection, so it will be destroyed as soon as it
is Released.
RemarksIf the source data is already an McObject, then it is just returned.
Otherwise, if the source data is some dual or dispinterface, then any default
Value (DISPID_VALUE) is accessed (this process is recursive, if necessary) as
the source data. Finally, a new, unnamed "temporary" IMcObject is created.
A new IMcObject created by this method is not part of the McObjects collection;
it will be destroyed as soon as the last reference on the returned IMcObject is
Released.
The type of a newly created IMcObject depends on the Variant type of the varValue
source data Variant argument.
A newly created McObject will be unnamed and have no ParentMcObject.
And it will not be part of the McObjects collection, so it cannot be looked up
via the Item property nor will it appear in any enumeration.
If the source data is some dual or dispinterface, then any default Value
(DISPID_VALUE) is accessed as the source data, thus if such a default Value is
available, the temporary IMcObject will not be of type mcobjTypeXOBJECT or a
derived type.
If any of this is a problem, call the McObjects.Add method directly to create a
McObject instance that is part of the collection, with the properties that you
desire. You may then use the McObject.RemoveFromCollection method to remove
that instance from the collection, effectively making it a "temporary" object.
See Also