TS_IUnknown

 (Available in 01 TS COM - TS_COM_IUnknown)

Purpose

Root class for all TS-static-allocated COM objects.

Syntax

CLASS MyIClass INHERIT TS_IUnknown

Access methods

IOwneds - Get the owned objects
RefCount - Get the current 'ref-count' value
IComponent - Gives the 'Component' object
DateTimeAsDate - Get the 'DateTimeAsDate' property
AsString - Get a string representing the interface ( Debug info )
IsInDestroy - Test if the object is being destroyed
IsDestroyed - Set the 'IsIndestroy' flag
IsInited - Test if the init method has been executed.
IsInInit - Test if the 'Init()' method is active.
FInit - Test if the interface is valid
IsInvalidated - Test if the object is 'InValidated'
IsValidObject - Test if the object is 'Valid'
NameSym - Get the name of the object
NeedNew - Test if calling the 'New()' method is needed
IOwner - Get the object owner
IThis - Get the 'SELF'
AIThis - Get the 'SELF'
IID - Get the IID of the enclosed interface.
AITypeLib - Get a static 'ITypeLib' COM interface pointer.

Assign methods

DateTimeAsDate - Set the 'DateTimeAsDate' property
IsInDestroy - Set the 'IsIndestroy' flag
NeedNew - Flag that calling the 'New()' method has been done
IID - Get the IID of the enclosed interface.

Methods

TSTraceInfo -
InvalidateObject - Invalidate the object
AddRef - Increment 'Ref-count' on the interface
Destroy - CALLBACK: This method will automaticly be called on the last 'Release()' call. Note: Never call this method directly, It will alwais be called on the last 'Release()'.
CountInInit - Set/reset the 'IsInInit'-flag
INIT - Create a 'TS_IUnknown' instance
NEW - CALLBACK: New ( OnInited event )
IIDAdd - Add a GUID to the list of supported interfaces
IIDDel - Remove a GUID from the list of supported interfaces
QueryInterface - CALLBACK: Query the COM interface
AGetInterface - Get a interface from the enclosed COM object
OnRegisterIOwned - CALLBACK: Called when a owned registers itself
OnUnRegisterIOwned - CALLBACK: Called when a owned unregisters itself
Release - Decrement 'Ref-count' on the interface
OnRegisterIOwner - CALLBACK: Called when a owner registers itself
OnUnRegisterIOwner - CALLBACK: Called when a owner unregisters itself

Description

This class provides lots of functionality not found in the TS_AbstractIUnknown class as defined by COM.

Inherits from

TS_AbstractIUnknown

Inherited by

TS_IAggregationInternals
TS_IClassFactory
TS_IDispatch
    TS_IDispatchCoClass
    TS_ISink

Example

See the 'TS_IDispatch' CLASS

Source

CLASS TS_IUnknown INHERIT TS_AbstractIUnknown
   TSTrace Data