473,791 Members | 2,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DLL: Exporting Functions

Hello,

I have a dll which I compiled in VB. Now I would like to use this dll in
MapBasic program. However, I keep getting an error saying that the function
which I am calling cannong be found. After doing some research, I learned
that VB's functions are not exportable and suggestion is to get PowerBasic or
XBasic.

I am just starting with VB so I am not sure if I am right, but can somebody
please tell me if I can make exportable functions in VB6? Or, is there a
'free' compiler that would make a proper DLL in VB? Does the newest VB.NET
version make a proper DLL? Thank you .

Victor.
Nov 21 '05 #1
7 1895
VB.NET makes Control Library DLL's & Class Library DLL's, but if you want a
non-MFC DLL then you need to write it in C/C++

There is an example of exporting functions & using them in VB.NET, here:

http://www.gotdotnet.com/Community/U...2-ca46ef086c12

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #2
"victorsk" <vi******@discu ssions.microsof t.com> schrieb:
I have a dll which I compiled in VB. Now I would like to use this dll in
MapBasic program. However, I keep getting an error saying that the
function
which I am calling cannong be found. After doing some research, I learned
that VB's functions are not exportable and suggestion is to get PowerBasic
or
XBasic.

I am just starting with VB so I am not sure if I am right, but can
somebody
please tell me if I can make exportable functions in VB6?
VB.NET doesn't support exporting functions, and VB6 doesn't support that
too. However, it's possible to intercept the linking process of VB6 and
make it create a DLL that exports functions. A German article about this
technique can be found here:

<URL:http://www.activevb.de/tutorials/tut_einsprungpu nktdll/einsprungpunktd ll.html>
Or, is there a
'free' compiler that would make a proper DLL in VB?
I don't know of any free compilers, but Delphi and VC++ can be used to
create such DLLs.
Does the newest VB.NET version make a proper DLL?


No, VB.NET cannot be used to create native DLLs.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
Hi,

Thanks for the reply. Ich no schprehen Deuch, sorry. Is there an English
article I can read please? Thank you.

"Herfried K. Wagner [MVP]" wrote:
"victorsk" <vi******@discu ssions.microsof t.com> schrieb:
I have a dll which I compiled in VB. Now I would like to use this dll in
MapBasic program. However, I keep getting an error saying that the
function
which I am calling cannong be found. After doing some research, I learned
that VB's functions are not exportable and suggestion is to get PowerBasic
or
XBasic.

I am just starting with VB so I am not sure if I am right, but can
somebody
please tell me if I can make exportable functions in VB6?


VB.NET doesn't support exporting functions, and VB6 doesn't support that
too. However, it's possible to intercept the linking process of VB6 and
make it create a DLL that exports functions. A German article about this
technique can be found here:

<URL:http://www.activevb.de/tutorials/tut_einsprungpu nktdll/einsprungpunktd ll.html>
Or, is there a
'free' compiler that would make a proper DLL in VB?


I don't know of any free compilers, but Delphi and VC++ can be used to
create such DLLs.
Does the newest VB.NET version make a proper DLL?


No, VB.NET cannot be used to create native DLLs.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4
"victorsk" <vi******@discu ssions.microsof t.com> schrieb:
Thanks for the reply. Ich no schprehen Deuch, sorry. Is there an English
article I can read please?


I am not aware of an English article about this topic, but maybe an
automatic translation to English is sufficient:

<URL:http://translate.googl e.com/translate?u=htt p%3A%2F%2Fwww.a ctivevb.de%2Ftu torials%2Ftut_e insprungpunktdl l%2Feinsprungpu nktdll.html&lan gpair=de%7Cen>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5
Hi,

Danke very much!

"Herfried K. Wagner [MVP]" wrote:
"victorsk" <vi******@discu ssions.microsof t.com> schrieb:
Thanks for the reply. Ich no schprehen Deuch, sorry. Is there an English
article I can read please?


I am not aware of an English article about this topic, but maybe an
automatic translation to English is sufficient:

<URL:http://translate.googl e.com/translate?u=htt p%3A%2F%2Fwww.a ctivevb.de%2Ftu torials%2Ftut_e insprungpunktdl l%2Feinsprungpu nktdll.html&lan gpair=de%7Cen>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #6
"victorsk" <vi******@discu ssions.microsof t.com> schrieb:
Danke very much!


:-)

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #7
Hi,

Very sorry to bother you again. I am having difficulty figuring out what
this application is doing. I've downloaded the application but not sure what
I should enter in "Linker-Controller" section. Sorry, I am quite new to VB
could you please clarify on what this app is doing? Thank you so much for
all your help.

Thank you,
Victor.
"Herfried K. Wagner [MVP]" wrote:
"victorsk" <vi******@discu ssions.microsof t.com> schrieb:
Danke very much!


:-)

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #8

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

Similar topics

4
2326
by: jr | last post by:
I am working in VC++ so this may be microsoft specific though I don't think so. Excuse me if it is. Assuming it isn't, can someone generally explain the purpose of having both - is it purely a deployment/distribution thing. I notice that the static library generates obj files and a Lib file. Could someone kindly explain how they relate to one another. Thanks very much
6
10259
by: Stijn | last post by:
Hi there, I have the following problem. At the moment I am creating an application that interfaces with several hardware modules via USB. Each of these devices has its own functionality and I want to make this functionality available to programmers in a very generic way. Therefore I came up with the following idea. 1) USB devices can have a small description. In this description i will store the name of the DLL that covers the device...
4
1797
by: Joshua Emele | last post by:
Hello - I am new to c# having come from the land of c. With c, I could create a .def file: library cdll exports foo @1 bar @2
8
37891
by: johnsto | last post by:
I'm really stuck - can someone help me! I've got a basic setup consisting of two things: 1. A C# web service 2. An unmanaged C++ DLL The WS is intended to call some functions in the DLL. The DLL has some legacy code which requires char* in its method parameters. I also have a new file in the DLL which is basically an intermediary -
6
4138
by: ian | last post by:
Hi All I have a DLL (nahd.dll) that has been supplied to me will a PBX phone system. According to the documentation it is to allow developers to write there own applications to monitor the system. Now when I try to register this DLL I get an error. “DLL RegisterServer entry point not found” According to Microsoft this means it is not a DLL. I can view it using Dependency Walker and it has all the events mentioned in the...
1
1072
by: JackHWarner | last post by:
I'm porting an app from vc++6 to vc++ 7.1, and am having some trouble exporting functions. I can export simple functions from a DLL by simply putting __declspec(dllexport) in front of them, and I can then use them just fine in my app. When I try to export a function with a CString argument, though, I can't seem to get anything to work. I can get the DLL to link, but I always get a link error on my app. I've tried the __declspec(dllexport),...
6
2389
by: Bart Simpson | last post by:
I am writing a shared object (Dll in Windows) and I am making extensive use of the STL. I am getting lots of warnings like this: ClassA.h(139): warning C4251: 'ClassA::indexarray' : class 'std::vector<_Ty>' needs to have dll-interface to be used by clients of class 'ClassA' with
0
1493
by: avimitrani | last post by:
Hi, For exporting functions from a dll written in native C++ I use :"__declspec(dllexport)". What is the equivalent way to it for functions of the "clrcall calling convention", written in C++/CLI ? Thanks, Avi.
17
7258
by: Fabry | last post by:
Hi All, I'm new of this group and I do not know if this is the correct group for my question. I have a DLL with its export library (.lib) wrote in Borland C++ 6. In borland everything is OK and I am able to include the lib and use the class that i have exported creating an instance with new etc... I would like to export this class in microsoft VC++ using the same .lib file. Obviously it doesn' t work.
1
1354
by: Mohammad Omer | last post by:
I am writing code for creating DLL using vs2k5. My project is using Crypto++ lib project, which has a function (ComputeHash), and with the same name of function I have written in project with a little bit change as follows Crypto++ function: protected: unsigned int __thiscall CryptoPP::Deflator::ComputeHash(unsigned char const *)const My function:
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10426
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9993
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9029
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7537
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5430
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.