
January 8th, 2013, 05:34 AM
|
|
Contributing User
|
|
Join Date: Jun 2003
Posts: 879
Time spent in forums: 2 Days 9 h 3 m 32 sec
Reputation Power: 10
|
|
System.EntryPointNotFoundException
Hi
I need to reuse a script in VB6 that decrypts and encrypts to be able to use it in VB.NET projects. I made as an ActiveX DLL, I tried referencing it but .NET won't accept it. I tried DLLImport but i'm getting 'System.EntryPointNotFoundException' Error.
I tried adding a module in the dll then recompiling it again and had a startup of SubMain but still the same error exists.
Below is my code using VB.NET:
Imports System.Runtime.InteropServices
Public Class Form1
<DllImport("prj_MFEE_CRYPT_DECRYPT.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function Crypt(ByVal s_text As String) As String
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim c_str As String
c_str = Crypt("phoenix")
Debug.Print(c_str)
End Sub
Anyone knows what I'm missing?
Thanks
|