Question : riddle vb.net calling unmanaged c++ dll

hi experts,

since our server moved to windows 2008 64 bit,our old delphi 5 cgi wont work anymore cause of iis incompabilities.

The delphi cgi prog uses a foreign c++ dll with unmanaged code.
The dll was introduced in delphi with:

1:
function AbgabePreis(p:pChar): pchar; cdecl; external 'customer.dll' name '?AbgabePreisBerechnung@APlusVServerDelphi@@YAPBDQBD@Z';

I now try to rewrite the application into a vb.net aspx solution.

1:
2:
3:
4:
5:
6:
7:
8:
<DllImport(DllFileName, _
            EntryPoint:="?AbgabePreisBerechnung@APlusVServerDelphi@@YAPBDQBD@Z", _
            SetLastError:=True, _
            CallingConvention:=CallingConvention.Cdecl, _
            CharSet:=CharSet.Ansi)> _
        Public Shared Function StrAbgabePreis( _
            ByRef s As StringBuilder) As StringBuilder
          End Function


I tried a lot of possible solutions but no avail.
The entry point is correct. The problem is that the dll is not getting the correct parameter.

Any help is much appreciated.

duke63

Answer : riddle vb.net calling unmanaged c++ dll

Random Solutions  
 
programming4us programming4us