I’m trying to invoke on dll method from an ASP.net web. It’s working on a W2003 server but the same dll and the same web is crashing on w2008 server R2 with IIS 7.5.I’m doing like this to import the dll:
<DllImport("Cripto.dll")> _
Public Shared Function DesCipher(ByVal uiMode As Integer, ByVal uiLength As Integer, ByVal szSourceData As String) As String
End Function
I have tried a 64 bits dll compile but the problem remains.
I’m going mad…
Please Help!
Finally I have found the clue.
It is a memory location problem. The main function was returning an array like this:
char retorno[10000];
The function was declared in the dll code as “char*”
By changing these lines:
instead of
return ((char *)retorno)
Now it’s working.