Re: Error when importing DLL
- From: "bruce barker \(sqlwork.com\)" <b_r_u_c_e_removeunderscores@xxxxxxxxxxx>
- Date: Fri, 9 Jun 2006 09:02:40 -0700
in asp you are calling your dll thru com, in asp.net you are trying to do
native C calls. you need to make a com interop wrapper, or read docs on
calling com interfaces.
for asp.net you will need to know if you com obj is STA (vb6) or not. if its
STA and your pages must specify aspcompat=true (at some performance cost).
it can not be used from a webservice (as there is no aspcompat support) also
you must call Marshal.ReleaseComObject or you will have a memory "leak".
-- bruce (sqlwork.com)
"vermin" <vermin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:37F495A9-6FBA-404F-8A4C-0CA388251744@xxxxxxxxxxxxxxxx
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!!
.
- Prev by Date: Re: zoom image
- Next by Date: Re: DataBinding string[]
- Previous by thread: zoom image
- Next by thread: RegisterClientScriptBlock not updating
- Index(es):
Relevant Pages
|