G
Guest
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)
..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)