Issue with 3rd party COM-object

1C:Enterprise platform integration capabilities and techniques

People who like this:0Yes/0No
Just came
Rating: 1
Joined: Oct 19, 2011

Dear colleagues,

1. We have a third-party COM-object.
2. COM-object was succesfully mounted into 1C: Enterprise by:
mgAPI = New COMObject("mgAPI.mg_API");
3. Mentioned COM-object has several internal interfaces with some set of methods for each of them.
4. After creation of COM-object exemplaire in 1C (point 2) we have
available methods of its default interface (coclass mg_API {[default]
interface IMGApplication;};)
5. Other interfaces methods are not availble after COM-object creation
in 1C by default.
6. All interfaces of COM-object are inherited from classical
IDispatch. But methods Invoke, GetIDsOfNames and others inherited
methods of IDispatch are not available in 1C (1C returns an error
message that method does not exist).

Main question is: does 1C plattform have an ability for access to
other interfaces (point 5) methods of such a COM-object?

Thank you in advance for suggestions of solution.

People who like this:0Yes/0No
Timofey Bugaevsky


Sorry for the long delay. According to the documentation, it supports one or more interfaces. If you think, that the behavior is incorrect, please provide an example that reproduces an error.

Each COM object implements one or several interfaces to perform different operations. It also should support a mandatory interface IUnknown. To create an object an get a pointer to one of interfaces the following Win32 functions are used: CoCreateInstanceEx, CoCreateInstanceFromFile, CoGetClassObject and others. One of parameters is CLSID (Class Identifier) - it is a GUID that was used to create an object. The system uses data in Registry during creation of object.

IID is another parameter of function during creation of object. It is an ID of the required interface. Functions that create an object, return the pointer to the requested interface. This pointer can be used to get another interface by calling QueryInterface.

Each object supports counter of object pointers. This counter value is changed by AddRef and Release calls of the object interface. If after calling Release the counter becomes 0, this means that there is no reference to this object and this object is destroyed. QueryInterface increases pointer count automatically.

Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.