API calls fail in ASP.Net

From: howard dierking (howarddierking_at_discussions.microsoft.com)
Date: 01/06/05


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)



Relevant Pages

  • Re: API calls fail in ASP.Net
    ... Are you storing the resultant tif in a file? ... > am stumped as to the stack overflow exception. ... > ByVal dstTIFF As String) As Integer ... > Dim inputfile As String ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: SQL statement with extra characters
    ... Dim db As Database ... Dim outputfile as String ... > it works fine when I run the statement on the database itself. ...
    (microsoft.public.access.externaldata)
  • Search pattern
    ... Dim strfile As String ... Dim bAddressFound As Boolean ... Dim strCurrentChar As String ...
    (comp.databases.ms-access)
  • Auto Write Name and Merge across
    ... Dim Sheetname01 As String ... Dim WeekName01 As String ...
    (microsoft.public.excel.misc)
  • Re: multiplatform (pocketPC & desktopPC) (Daniel !!)
    ... Friend Versione As String ... Public Sub GetMyConnectionPalmare() ... Dim errorMessages As String ... Private Function GetDS_Desktop(ByVal SQL As String) As DataSet ...
    (microsoft.public.dotnet.framework.compactframework)