Error when importing a DLL

Discussion in 'ASP General' started by vermin, Jun 9, 2006.

  1. vermin

    vermin Guest

    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!!
     
    vermin, Jun 9, 2006
    #1
    1. Advertising

  2. 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("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.

    --
    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"
     
    Bob Barrows [MVP], Jun 9, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    8,870
  2. =?Utf-8?B?dmVybWlu?=

    Error when importing DLL

    =?Utf-8?B?dmVybWlu?=, Jun 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    462
    bruce barker \(sqlwork.com\)
    Jun 9, 2006
  3. plb
    Replies:
    2
    Views:
    362
  4. Replies:
    0
    Views:
    371
  5. H. Simpson
    Replies:
    4
    Views:
    308
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page