Error when importing a DLL

V

vermin

Good morning.

I have received a dll with an encrypting function I have to use in a asp.net
page.

I can't import it correctly. In classic asp I use the method I want in this
way:

<%
Set x = Server.CreateObject("BitamEncrypt.clsEncrypt")
If Not x Is Nothing Then
Response.Write x.Encrypt("hola")
End If
%>

This works correctly and the string is encrypted. When writing it asp.net
I'm having some problems. I am using dllImport:

[System.Runtime.InteropServices.DllImport("BitamEncrypt.dll",
EntryPoint="clsEncrypt.Encrypt")]
internal static extern string Encrypt(string a);

When invoking the Encrypt method I get an EntryPointNotFoundException. I
also get it if I declare the Entrypont parameter like this:
EntryPoint="Encrypt".

Any idea to solve this??

Thanks a lot!!
 
B

Bob Barrows [MVP]

vermin said:
Good morning.

I have received a dll with an encrypting function I have to use in a
asp.net page.

There was no way for you to know it (except maybe by browsing through some
of the previous questions before posting yours - always a recommended
practice) , but this is a classic asp newsgroup. ASP.Net bears very little
resemblance to classic ASP so,
while you may be lucky enough to find a dotnet-knowledgeable person here who
can answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-knowledgeable people hang out. I
suggest microsoft.public.dotnet.framework.aspnet.
I can't import it correctly. In classic asp I use the method I want
in this way:

<%
Set x = Server.CreateObject("BitamEncrypt.clsEncrypt")
If Not x Is Nothing Then
Response.Write x.Encrypt("hola")
End If
%>

This works correctly and the string is encrypted. When writing it
asp.net I'm having some problems. I am using dllImport:

[System.Runtime.InteropServices.DllImport("BitamEncrypt.dll",
EntryPoint="clsEncrypt.Encrypt")]
internal static extern string Encrypt(string a);

When invoking the Encrypt method I get an
EntryPointNotFoundException. I also get it if I declare the Entrypont
parameter like this: EntryPoint="Encrypt".

Sorry, I've never used Interop. You should post to the aspnet group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top