开发者

Can COM Component be used in platforms other than windows?

开发者 https://www.devze.com 2023-01-06 02:09 出处:网络
I wanted to know whether is it possible to make use of COM component in other platforms like linux,etc..,

I wanted to know whether is it possible to make use of COM component in other platforms like linux,etc..,

My question is that COM component is su开发者_JS百科pposed to be registered with OS & For that OS need something like registry so that client can use COM components.

Can anyone shed light on my question ?


If you want to have the ability to create COM classes by specifying a "string", and wish the OS can search for the correct binary library to load from as well as creating the actual COM class (object), then some form of registering is needed.

Other than that, if you only want to use COM-style interfaces (interfaces derived from IUnknown, IDispatch, etc) you can do that in any C++ languages (as long as the vtable implementation of that C++ compiler is compatible with COM).

Finally, some COM capabilities such as inter-process communication and remote invocation are provided as part of Windows OS. You will need to implement your own if these capabilities are needed.

The Wikipedia page on CORBA appears to have some references to a number of choices. Check the See Also section.


The wikipedia entry for Microsoft COM says in the "Overview" that "the interface standard has been implemented on several platforms", but fails to specify which ones. If you're looking for a cross-platform approach, you may be better off with something like XPCOM instead.


Technically speaking, COM is just an architecture that can be implemented in any platform. Looking up registered classes in the registry, for example, is something you could implement in an equivalent way on any other platform. The rest of it is about DLLs and MIDL, which you can get working on any platform.

Practically speaking, COM is for Windows (and even that's dying pretty quickly).


The theoretical answer is yes, it's possible to use COM components on other platforms. Here's an article from way back in 1998 on Building COM Components on UNIX. However, even back in the day this was not a popular (or prudent!) approach.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号