IID

 (Available in 01 TS COM - TS_COM_IUnknown)

Purpose

Get the IID of the enclosed interface.

Syntax

? TS_GUID2String( oDelegateIUnknown:IID )

Description

Get the ( main ) IID of the enclosed interface. The IID ( Interface ID ) is used by COM to identify interfaces. The returned IID can be seen as the classname of the interface. See also IIDAdd and IIDDel.

Returns

POINTER, IID as WinGUID

Example

IF TS_IsEqualGUID( oDelegateIUnknown:IID, TS_GUID_IDispatch( ) )
// Use the 'IDispatch' interface of the interface
ELSE
   TSTrace Warning "This interface dous not support 'IDispatch'"
END

Source

ACCESS IID CLASS TS_IUnknown
LOCAL oCOMGlobalData AS _TS_COMGlobalData
LOCAL pstruWinGUID AS _WinGUID
   TSTrace Enter
   oCOMGlobalData:=_TS_ModuleGetCOMGlobalData( )
   #IFDEF TS_COMGLOBALDATA_CRITICALSECTION
      EnterCriticalSection( oCOMGlobalData:_COMGGeneralPurposeSection )
   #ENDIF
   pstruWinGUID:=SELF:_IID
   #IFDEF TS_COMGLOBALDATA_CRITICALSECTION
      LeaveCriticalSection( oCOMGlobalData:_COMGGeneralPurposeSection )
   #ENDIF
   TSTrace Leave
RETURN pstruWinGUID