IsComInterface - Check a value for being a COM Interface

Top  Previous  Next

Syntax

<lValue> := IsComInterface( <testvalue> )

Parameters

<testvalue>

 

The value to test for being a COM interface.

Return value

If <testvalue> is a COM interface, the return value is .T., otherwise it is .F. .

Description

IsComInterface first checks if <testvalue> is an object. If not, it immediately returns .F. . If <testvalue> inherits from the IdentifyAsComInterface class, it returns .T. .

Classification

Core

Category

Type check

Quick Info

Library: cckptcor.lib /cckptcor.dll

See also

IdentifyAsComInterface, IsValidComInterface

Example

 

* Auto-link the Cockpit Core libraries

#INCLUDE "CockpitCoreLibs.ch"

 

* Declare a class that inherits from IdentifyAsComInterface

CLASS MyInterface FROM IdentifyAsComInterface

ENDCLASS

 

 

FUNCTION Main

 

LOCAL ifc := MyInterface():New()

 

* Check the object for being a COM interface

IF IsComInterface(ifc)

  ? "ifc is a COM interface."

ENDIF

 

RETURN NIL