GetCOMObjectProperties

 

Description

Set the treenode with the properties of COM object.

Syntax

BOOL GetCOMObjectProperties( Object * pObj, TreeNode * ptr, BOOL bExcludeArrayElement = TRUE )

Parameters

pObj
[input]pointer to an existing COM object reference which must have been initialized.
ptr
[input]the treenode will be set with the properties of pObj.
bExcludeArrayElement
[input] if TRUE, it will not be added to tree when a property is array.

Return

true if success

Examples

EX1

       //it shows the created object, but gets none property from the object.
void    GetCOMObjectProperties_ex1()
{
        Object obj = CreateObject("Word.Application");
        obj.Visible = true;
        Tree trProperty;
        if ( GetCOMObjectProperties(&obj, &trProperty ))
        {    
                out_tree(trProperty);
        }
        else
        {
                out_str("failed to get properties of COM object to treenode!");            
        }
}

Remark

See Also

Header to Include

origin.h

Reference