title: COM basic sample
body: <p>I've been reading <a href="https://rads.stackoverflow.com/amzn/click/com/0201634465" rel="nofollow noreferrer" rel="nofollow noreferrer">Essential COM</a>, it is a very good book, very instructive and simple to understand. Now I want to speed things up and implement a simple COM object, compile it into a .dll and finally use it from a client application.</p>
  
  <p>I would really appreciate if anybody could show the most basic sample of how to do that?</p>
  
  <p>I've been trying with <a href="http://www.codeguru.com/cpp/com-tech/activex/tutorials/article.php/c5567" rel="nofollow noreferrer">this step by step</a> but, besides founding some errors, I could not make it work. The reason for this is that I've created a simple Win32 application, I started coding the COM from scratch (as the step by step shows) and fails to compile/link (lot of errors), I must be forgetting some configuration or some includes in stdafx.h or whatever.</p>
  
  <p>I'm working in Visual C++ with Microsoft Visual Studio .Net 2003</p>
  
  <p>Thanks in advance!</p>