COMException: Failure

  • Thread starter Thread starter Damaji Jambhale
  • Start date Start date
D

Damaji Jambhale

COMException: Catostrphic failure

When I added a "dll" reference in the web project.
I was able to instantiate the class OK. But when I tried
to set the properties, it failed with
"COMException: Catostrphic failure".

Any idea?

Thanks.
 
Hi Peter:

Thanks for the reply. We are going nuts over this.
Here are more details.

1. Created windos application.
2. Added reference to this COM dll.
3. Here is the code:
Dim aPDF As aspPDF.EASYPDFClass
aPDF = New aspPDF.EASYPDFClass()
aPDF.AddText("asdsdsa")
It creates the instance successfully, but fails at last
line with the message below:

An unhandled exception of
type 'System.Runtime.InteropServices.COMException'
occurred in WindowsApplication1.exe
Additional information: Catastrophic failure.

The dll is a aspEasyPdf dll which allows creating PDF
documents.

Thanks.
- D.J.
 
Hi Damaji,

I have tested your code and I can reproduce the problem. I think it is the
issue how aspeasypdf design.
You can try the code below which will work on my machine.

Dim PDF As aspPDF.EASYPDFClass
PDF = New aspPDF.EASYPDFClass
PDF.OnStartPage(Nothing) 'I think the line code is a key point.
PDF.AddText("fsadfsdfsdf")
PDF.Save("test.pdf")
MsgBox("DONE")

You may have a try and let me know the result.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


--------------------
 
Hi Peter,

Thanks for the reply and finding.
Yes, it works, it still has other problem but as you said
it must be with aspEasyPdf design.

Thanks a lot.
 
Back
Top