473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Error when importing DLL

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
1 1181
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" <ve****@discussions.microsoft.com> wrote in message
news:37**********************************@microsof t.com...
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 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Daryl Zavier | last post by:
Hi Gurus, Please forgive me if my question is dumb cause this is my first web application I've done. Currently in my web application there is a button to click which will fire off a DTS event...
9
by: M.N.A.Smadi | last post by:
HI; I am having the following error. I am using someone else's code and all they are doing is pass an argv to a function then def execute_action(manager, argv): method_name =...
10
by: RWC | last post by:
Hello, I'm having a problem that I'm having a lot of trouble with. I'm running Access XP, with all the updates, including service pack 2. I'm on a Windows XP machine. I have a database which...
3
by: Praetorian Prefect | last post by:
Code will not work in XP. Any ideas? Public Sub GetData() ' Declare variables Dim InputDir, ImportFile As String, tblName As String, strsql As String InputDir = ("f:\") ImportFile =...
9
by: advance scout | last post by:
HELP! My database is suddenly corrupted. My computer was acting funny (very sluggish) and was shut down. Access had been already been closed down but computer was acting very slow , so perhaps it...
0
by: Alun Jones | last post by:
I'm getting the above error in a dialog box from Visual Studio 2005 when trying to sign an assembly using a PFX file, and would like to know how to resolve the problem. Background: The PFX...
1
by: puremetal33 | last post by:
I have worked very little with Access and have hit a snag. My task right now is to import the data from a spreadsheet into an existing table in an Access database. I edited the .xls file so that...
3
kickingthehabbit
by: kickingthehabbit | last post by:
Hi All new to all of this I just downloaded reactor server. everything works fine except Mysql - SQL import files. I am trying to import file createdb.sql I open DB and try and import with...
3
by: nimajneb via AccessMonster.com | last post by:
Can anyone offer me any insight on the following problem? I have an Access database on a company shared drive. I'm the designer and the only user (so far). Suddenly, any time I try to open a...
6
by: passionateforjava | last post by:
Hi All, I am using struts application wherein I need to import file for some purpose.I have used input type="file" for the same which goes like: <input type="file" id="uploadFile" name="uploadFile"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.