The OpenD Programming Language

getComObject

Create a COM object. The passed interface should be a child of IUnknown and from core.sys.windows or have a ComGuid UDA, or be something else entirely and you get dynamic binding.

The string version can take a GUID in the form of {xxxxx-xx-xxxx-xxxxxxxx} or a name it looks up in the registry. The overload takes a GUID object (e.g. CLSID_XXXX from the Windows headers or one you write in yourself).

It will return a wrapper to the COM object that conforms to a D translation of the COM interface with automatic refcounting.

version(Windows)
getComObject
(
T = Dynamic
)
(
wstring c
,
bool tryCreateIfGetFails = true
)

Meta