API calls fail in ASP.Net
From: howard dierking (howarddierking_at_discussions.microsoft.com)
Date: 01/06/05
- Next message: Juan T. Llibre: "Re: Error running ASPNET_RegIIS -c"
- Previous message: Marina: "Re: Error on creating a text file to write lines"
- Next in thread: Mark Fitzpatrick: "Re: API calls fail in ASP.Net"
- Reply: Mark Fitzpatrick: "Re: API calls fail in ASP.Net"
- Reply: bruce barker: "Re: API calls fail in ASP.Net"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 6 Jan 2005 13:07:04 -0800
I have an unmanaged library that i'm using to generate a .tif image from a
.pdf file. When I run the following code in a console application,
everything works fine. However, when I run it from ASP.Net, I get a stack
overflow exception. If anything, I would have expected a CAS exception - but
am stumped as to the stack overflow exception. Below is the code used to
call the native API.
TIA,
_howard
Private Declare Function SetXY Lib "CP2T.dll" (ByVal resx As Integer,
ByVal resy As Integer) As Integer
Private Declare Function SetBPP Lib "CP2T.dll" (ByVal bpp As Integer) As
Integer
Private Declare Function SetCompress Lib "CP2T.dll" (ByVal compress As
Integer) As Integer
Private Declare Function SetSize Lib "CP2T.dll" (ByVal sizewidth As
Integer, ByVal sizeheight As Integer) As Integer
Private Declare Function PageRange Lib "CP2T.dll" (ByVal firstpage As
Integer, ByVal lastpage As Integer) As Integer
Private Declare Function Convert Lib "CP2T.dll" (ByVal srcPDF As String,
ByVal dstTIFF As String) As Integer
....
Dim result As Integer
Dim inputfile As String
Dim outputfile As String
result = SetXY(2 * 204, 2 * 98)
result = SetSize(2 * 1728, 2 * 1051)
'Run the conversion
inputfile = "c:\817.pdf"
outputfile = "c:\817.tif"
result = Convert(inputfile, outputfile)
- Next message: Juan T. Llibre: "Re: Error running ASPNET_RegIIS -c"
- Previous message: Marina: "Re: Error on creating a text file to write lines"
- Next in thread: Mark Fitzpatrick: "Re: API calls fail in ASP.Net"
- Reply: Mark Fitzpatrick: "Re: API calls fail in ASP.Net"
- Reply: bruce barker: "Re: API calls fail in ASP.Net"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|