Click here to Skip to main content
15,885,366 members
Articles / Programming Languages / C

COM in plain C, Part 2

Rate me:
Please Sign up or sign in to vote.
4.96/5 (98 votes)
20 Apr 2006CPOL39 min read 274.9K   6.2K   165  
How to write a COM component in C that can be used by script languages such as VBscript, Visual BASIC, jscript, etc.
<HTML><BODY TEXT=BLACK BGCOLOR=WHITE LINK=RED VLINK=PURPLE ALINK=PURPLE><FONT SIZE=4>
<H1><CENTER><FONT COLOR=RED>COM in C</FONT></CENTER></H1>
<H2><CENTER>By Jeff Glatt</CENTER></H2>

There are numerous books/examples that demonstrate how to use/create COM/OLE/ActiveX components. But these books typically use Microsoft Foundation Classes (MFC), .NET, C#, WTL, or at least ATL because those frameworks have pre-fabricated "wrappers" to give you some boilerplate code. Unfortunately, these frameworks tend to hide all of the low level details from a programmer, so you never really do learn how to use COM components per se. Rather, you learn how to use a particular framework riding on top of COM.

<P>If you're trying to use plain C,  without MFC, WTL, .NET, ATL, C#, or even any C++ code at all, then there is a dirth of examples and information how to deal with COM objects. This book teaches how to create a COM component in plain C, without using any of the above frameworks. As such, it allows a programmer the fullest control over the minute details of implementing a COM component, is not confined to using any particular C compiler, and may be used to create custom COM frameworks including those that run upon platforms other than Windows.
</FONT></BODY></HTML>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions