473,387 Members | 1,597 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,387 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 1398
* "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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...

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.