By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,817 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

Error when importing a DLL

P: n/a
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("BitamEnc rypt.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!!

Jun 9 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
vermin wrote:
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("BitamEnc rypt.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.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jun 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.