We are trying to migrate a .NET web application from windows 2003 (yes, really) up to 2019 and having issues with our .NET and Delphi DLL.
We can't recompile the Delphi DLL into 64 bit, it has to run as 32 bit. Essentially there's a .NET C# http handler application that calls the Delphi DLL and the Delphi DLL passes information back to the handler.
I have changed the application pool to run 32 bit. I have recompiled the .NET handler as x86
What I'm getting is a stack exception. Again, this all worked under 2003 flawlessly for years - we're talking processing millions of transactions per day kind of working.
The C# code is:
[DllImport("UrlIniLib", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall )]
static extern Boolean ProcessRequestA(String VersionId, String IPAddr, String TokenId, String RegId, String UserId, String UserAgent, StringBuilder IniHTML, ref Int32 IniHTMLSize);
The Delphi function declaration is basically all pChar's, except for IniHTMLSize which is defined in delphi as a integer. The output is a longbool, and also defined as stdcall. For some reason, my boss doesn't want to me to show the function. No idea.
The error I'm getting is:
First-chance exception at 0x6285542D (clr.dll) in w3wp.exe: 0xC00000FD: Stack overflow (parameters: 0x00000001, 0x1F722E14).
First-chance exception at 0x6285542D (clr.dll) in w3wp.exe: 0xC0000005: Access violation writing location 0x1F720E14.
If I comment out the DLL function call in the handler, everything runs (without of course any data), so it's definitely when the call is invoked.
At this point I’m at a loss here. I’m not sure what would have changed from running this under 2003 to running it under 2019 when everything is complied as 32 bit (.NET and Delphi)
User contributions licensed under CC BY-SA 3.0