title: ActiveX in HTML
body: <p>My requirement is to instantiate an object using <code>new ActiveX()</code> in html.</p>
  
  <p>I have created a COM component <code>SimpleActiveX</code> using ATL. I have created the dll SimpleActiveX.dll for the same. In order to instantiate this component in html file I need to register the dll. So I registered the dll using the command <code>regsvr32 %Path of dll%</code>.
  After doing so I am trying to create and instance of the component in html file as follows,</p>
  
  <pre><code>var req;
  req = new ActiveX("SimpleActiveX.Hello"); //Assume Hello as a class.
  req.Hi(); //Assume that Hi() is a member function of Hello.
  </code></pre>
  
  <p>By doing so I am unable to create the ActiveX object.
  Html doesnt give any error too. I dont know whether I am doing anything wrong or am I missing anything.</p>
  
  <p>Could anyone please tell me the proper steps to perform above operations. </p>
  
  <p>How do I need to create the dll (Here in this case I have just build the ATL project in Visual Studio to generate the dll)?</p>
  
  <p>What else do I need to do with the dll in case if I need to create an ActiveX object in html?</p>
  
  <p>I had come across something called as <code>&lt;object&gt; &lt;/object&gt;</code> tag in html where we mention the classid and attributes. I dont know whether I need to mention this in my html file or not. </p>
  
  <p>Thanks for your help in advance.</p>