title: How to call COM printing component in Silverlight
body: <p>My silverlight application will have print capability, the printing module is created in separated csharp project, and call the module using this code:</p>
  
  <p>m_ComPrinterContoller = AutomationFactory.CreateObject("ComPrinter.Application");</p>
  
  <p>My printing module is separated c# project and will create let say ComPrinter.dll, inside of it there is select default printer and printing for every forms that need to print.</p>
  
  <p>In development laptop I will build the printing module and then I run my application smoothly, but in hardware machine it error, first the error is progId is not registered, so I register my ComPrinter.dll using RegAsm, because I cannot register it using regsvr32, and now the progId is registered, there is my dll name in HKCR (I run regedit and expand the HKEY_CLASSES_ROOT).</p>
  
  <p>Now it already registered, but there is new error, a dialog message: "ComAutomation_CreateInstance".</p>
  
  <p>And when I install visualStudio and build the ComPrinter project, and then I run my application (not from visual studio, but from the application directly), and the application is run smoothly.</p>
  
  <p>What is .net did when build and create .dll?  it's kind of registering the .dll but different from regsvr32 or regAsm. Or anyone have ever meet situation? how to register .Net dll COM and call it from silverlight application, and run it not in development computer</p>
  
  <p>There is similar link that ask the same question: <a href="http://support.leadtools.com/CS/forums/35174/PrintPost.aspx" rel="nofollow">http://support.leadtools.com/CS/forums/35174/PrintPost.aspx</a>, but it still not have answer.</p>
  
  <p>Regards,
  Imam</p>