How to use this COM library in Visual studio 2005

Using OLE Automation API
Post Reply
Haissam
Posts: 1
Joined: Fri Mar 07, 2008 11:44 am

How to use this COM library in Visual studio 2005

Post by Haissam » Sat Mar 08, 2008 2:48 am

Well, after i saw your product i said to myself i have to try it before buying.
I took the SDK and from the tlb file i produced the P2F.dll and add its reference to Visual studio
Now using the below code is giving an error

P2F.Server2 s = new P2F.Server2();
s.ConvertFile(Server.MapPath("~/1.pdf"), Server.MapPath("~/1.pdf.swf"), null, null, null);

ERROR:
{System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {7F8A0980-3F6E-421B-87EA-4D4A077B1DDD} failed due to the following error: 80040154.
at Conversion._Default.Button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\hmalak\My Documents\Visual Studio 2005\Projects\Conversion\Conversion\Default.aspx.cs:line 24}

If you have proper documents on how to use it in Visual studio it would be excellent.
I would not care about the proper if the integration with .NET is hard.

Regards,

staff
Posts: 282
Joined: Sat Dec 15, 2007 4:48 pm

Re: How to use this COM library in Visual studio 2005

Post by staff » Tue Mar 11, 2008 7:53 am

Have you setup Print2Flash service as specified at this help page: http://print2flash.com/help/SettingupAu ... ccount.php ? You need to do this in order to use P2F.Server2 class. You may also use P2F.Server class which does not require setting up the service but it does not work well in web server (ASP.NET) environment. See also instructions in the ReadMe.htm file located in the ASP.NET sample folder.

Post Reply