473,396 Members | 2,002 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.

Creating DLLs

I'm sort of new to DLL creating, so I was hopeing that someone could give me
a little bit of help.

I have this information here in a DLL file:

Public Class ED_L1

Public Sub Encode_L1()

MsgBox("Tada!!!")

End Sub

End Class

I have this information here in the EXE file:

Public Declare Sub Encode_L1 Lib "EncL1.dll" ()

Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Encode_L1()

End Sub

Except when I run the program, I get this error:

An unhandled exception of type 'System.EntryPointNotFoundException' occurred
in CEnc.exe

Additional information: Unable to find an entry point named Encode_L1 in DLL
EncL1.dll.
So, what am I doing wrong? ( lol, I bet it's something real simple. ^.^ )
Nov 20 '05 #1
3 1399
* "Jeff Ostapchuk" <jo********@comcast.net> scripsit:
I'm sort of new to DLL creating, so I was hopeing that someone could give me
a little bit of help.

I have this information here in a DLL file:

Public Class ED_L1

Public Sub Encode_L1()

MsgBox("Tada!!!")

End Sub

End Class

I have this information here in the EXE file:

Public Declare Sub Encode_L1 Lib "EncL1.dll" ()

Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Encode_L1()

End Sub

Except when I run the program, I get this error:

An unhandled exception of type 'System.EntryPointNotFoundException' occurred
in CEnc.exe

Additional information: Unable to find an entry point named Encode_L1 in DLL
EncL1.dll.


You cannot export functions for use with 'Declare' in VB.NET. Instead,
add a reference to the DLL, then use this code:

\\\
Dim x As New ED_L1()
x.Encode_L1()
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

I wanted to know, if you could tell me, how would I pull it in through a
declare statement? Just so I know how to.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #3
* Ostapchuk Jeff <jo********@comcast.net> scripsit:
I wanted to know, if you could tell me, how would I pull it in through a
declare statement? Just so I know how to.


It's not supported. You cannot use .NET DLLs with 'Declare'.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

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

Similar topics

4
by: ernesto | last post by:
Hi everybody: I have a project with a lot of source files. Every logical set of source files is compiled and archived in .a files (using mingw toolchain): * library.data.a * library.ui.a *...
17
by: Fabrice | last post by:
Hi ! I'm looking for a tutorial on how to create a DLL in C (not C++). I don't know whether i can use C for this purpose, but i didn't find any post telling me that i cannot use C. So, if it is...
2
by: Jon Davis | last post by:
I have a full-blown application that consists of several (fifteen or so) assembly DLLs, each being a separate VS.NET project that outputs to the main DLL's bin directory. They are all strongly...
8
by: Oenone | last post by:
Is it possible to create an object which can have methods and properties, but which can also be treated as a string? I'm trying to create a wrapper around the IIS Request.Form object which...
3
by: =?Utf-8?B?WmlhbmdpIEpvbmVz?= | last post by:
Hi, I m using VS .NET 2003 to create a website. Using the setup package I create a setup as well. But this setup has files with actual code in it & not pre-compiled DLLs. Please let me know...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.