DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Search Documentation


IPropertyArray2 Interface

GetCount
GetProperty
GetName

All indices in DG Kenel are 0-based

IPropertyArray2 is a modification of IPropertyArray interface, provided for environments which do not recognize IUnknown data type.

IPropertyArray2 is an alternative to QueryInterface() way to obtain access to some generic interfaces. IPropertyArray2 retrieves interfaces by its name. For example IPropertyArray2 implemented by a generic 3D Object has a property named "TextureArray". See Properties topic for the list of all available properties.

In this release all properties are arrays themselves (this not necessarily will be the case in future releases.), which may be confusing. So practically the property array is array of arrays or a method to distinguish between different IArray interfaces implemented by the object. 

See also Properties, Light Sample, Texture Sample, ITexture, IArray Interface, Interface List


HRESULT GetCount(int * pnCount)

Parameters

pnCount- [out] Pointer to an integer variable which will be set to number of properties in the array

Returns

S_OK in case of success.

HRESULT GetProperty(char* szPropertyName, VARIANT* prop)

Parameters

szPropertyName - [in] name of the property to retrieve.

prop - [out] reference to a VARIANT variable, which will be assigned an appropriate  interface which gives access to the property..

Return Values

S_OK in case of success.

DISP_E_BADINDEX - if the index is out of range

DISP_E_PARAMNOTOPTIONAL - if the property  is not available.

Remarks:
 
This method gives access to the named property of the object, which implements the IPropertyArray. Most often actual type of the interface is different from IUnknown and can be cast to the specific type, which is described for each specific use of the IPropertyArray interface. 

HRESULT GetName(int index, char* szName)

Parameters

index - [in] index of the property to retrieve

szName - [out] pointer to a variable, which will be set assigned the name of the property. Maximal length of a property name in the current release is 30 characters. This length can be retrieved programmatically as value of member of enumeration EDIConst. C++ declaration of the enumeration can be found in Samples/VC/Include/DITypes.h file (include DIInterface.h)

Return Values

S_OK in case of success.

DISP_E_BADINDEX - if the index is out of range

DISP_E_PARAMNOTOPTIONAL - if the property  is szName is NULL.

Remarks:
 
Call this method to query for available properties.