accessing a static property via COM
Posted
by joreg
on Stack Overflow
See other posts from Stack Overflow
or by joreg
Published on 2010-03-11T19:59:30Z
Indexed on
2010/03/11
20:04 UTC
Read the original article
Hit count: 410
is it possible to access a static property of a COM object without creating an instance of the object?
my situation is this: i have an unmanaged application (written in delphi). this application exposes a COM-based plugininterface. until now i only wrote managed plugins in c#. plugins provide their info (name, author, ..) via a static property that returns an instance of PluginInfo (which implements IPluginInfo). this static property i can access on the managed plugins using http://managedvcl.com.
now i want to write unmanaged plugins on the same interface. i can load them using:
plug := CreateComObject(TGuid) as IMyPlugInterface;
and they run, but i don't know how to read out their PluginInfo.
so the question again is: is there another way than implementing IPluginInfo in the plugin-class and only accessing the info after i have created an instance of the plugin?
© Stack Overflow or respective owner