title: Instantiating an ActiveX Object
body: <p>I have imported an ActiveX library into my project in Visual Studio 2008 using: </p>
  
  <pre><code>#import "TeeChart8.ocx" named_guids
  </code></pre>
  
  <p>Now I would like to create objects exposed by the ActiveX library. However, I am having trouble understanding the API.</p>
  
  <p>There are two files that were created after I built the project with the <code>#import</code>, a .tli file and a .tlh file.</p>
  
  <p>In the .tlh file there is the following line:</p>
  
  <pre><code>_COM_SMARTPTR_TYPEDEF(ITChart, __uuidof(ITChart));
  </code></pre>
  
  <p>I can see <code>ITChart</code> when I open the ActiveX library TeeChart8.ocx in the ITypeLib Viewer (Oleview). Also, if I type <code>ITChartPtr-&gt;Invoke</code> into my code, intellisense shows me that there are a whole bunch of parameters that need to be filled.</p>
  
  <p><strong>Essentially, I would like to know how to instantiate an ActiveX object and where I have to look to get the information I need?</strong></p>