How to get 2-part Interface_ID?

 
 
 
Posted by:duke
Data created:18 March 2010

Some of the interfaces have 2 part ID's, and when they're not declared in the .net api or it's enums, you have to use GetInterface or GetCOREInterface.

How else would i go about getting the instance of say, IIMergeManager or creating a new instance of IIDaylightSystem2 via IIDaylightSystemFactory2, both of which use the 2-part Interface_ID?

Currently some interfaces are supported but not all and can be retrieved using the GetInterface and GetCOREInterface methods. Only the following are supported ATM:

LAYERPROPERTIES_INTERFACE, LAYERMANAGER_INTERFACE, IDXMATERIAL_INTERFACE, PARAMWIRE_MGR_INTERFACE, IID_SCRIPT_CONTROL, IANIMLAYERCONTROLMANAGER_INTERFACE

Unfortunately these is no easy way of automatically wrapping all interfaces because of the ambiguity between their ID and classes, so they need to be added manually. If you can provide me with a list of classes/interfaces which you need to use I can make them available in next build (1.2.0).

Marsel Khadiyev (Software Developer, EPHERE Inc.)

I can see that you have LAYERDISPLAYPROPERTIES_INTERFACE, LAYERMANAGER_INTERFACE and LAYERPROPERTIES_INTERFACE in BuiltInInterfaceIDA/B (I can't find the others, they're probably in a later build than mine). Maybe i'll add a few or all of them if i'm crazy, and email you a patch?

I have probably not added them in there. I sometimes just use the integer values or do a local enum. If you can find the time, though, it'd be most welcome.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

I wrote a regex, and will make a .js to search/copy/format nicely into the 2 enums with UltraEdit.

 

\bdefine\s(?\b*.*?)[\s]
Interface_ID[(](?.\w+)[,]
[\s](?.\w+)

 

 

Sounds great :)

Marsel Khadiyev (Software Developer, EPHERE Inc.)