473,513 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

__declspec(dllexport) c++

Hello...
How can I do an exported function in Visual Basic.Net?

In Visual C++ the source is the next... but I need the same in VB.Net

Thank you

/* This is an example of an exported function. */
__declspec(dllexport) int fnDLLSAMPLE(void)
{

return 42;
}
Mar 3 '06 #1
2 5109
"Luis" <Lu**@discussions.microsoft.com> schrieb
Hello...
How can I do an exported function in Visual Basic.Net?

In Visual C++ the source is the next... but I need the same in
VB.Net

Thank you

/* This is an example of an exported function. */
__declspec(dllexport) int fnDLLSAMPLE(void)
{

return 42;
}

In the OO world, all methods are parts of classes. Create an assembly, add a
class and add the method. In the client app, set a reference to the
assembly. The client language must support the .Net Framework.
Armin

Mar 3 '06 #2
"Luis" <Lu**@discussions.microsoft.com> schrieb:
How can I do an exported function in Visual Basic.Net?

In Visual C++ the source is the next... but I need the same in VB.Net

Thank you

/* This is an example of an exported function. */
__declspec(dllexport) int fnDLLSAMPLE(void)
{

return 42;
}


You cannot export functions that way. All you can do is creating a .NET API
(classes, interfaces) and/or make this API visible to COM.

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

Mar 3 '06 #3

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

Similar topics

3
2586
by: Gawel | last post by:
Hajo, I have two dlls, both of them are compiled with /clr switch. In first dll project I have managed and unmanaged classes. One of the unmanaged I would like to use outside therefore I marked...
1
1288
by: Geoffrey | last post by:
We write lots of cross platform code at my company. To facilitate this, class declarations are handled like this (simplification): #if defined(_WIN32) #if defined(BUILDLIB) #define...
5
2035
by: Felix I. Wyss | last post by:
Good Afternoon, I recently noticed that some very simple methods of a template declared and used in a DLL library get inlined when used by the DLL itself, but not by other DLLs and EXEs. After...
5
2204
by: Jason W | last post by:
I have a C# class that I wan't to be able to use in VB6 and VBA applications. To do this I was trying to use a mixed managed VC++ dll and export a function. Doing this I get an error "The memory...
8
12421
by: bonk | last post by:
Hello, I created a MFC extension dll (using VS 2005 Beta 2) that is supposed to export a class that uses .NET internally (See header below) und later shall be used by a plain MFC Project (without...
7
1897
by: Martin Pritchard | last post by:
Hi, Sorry for my ignorance, but I'm a bit new to C++. I've been handed over a C++ app written in VS2002 which I have to convert to VS2005. Apparently it's been written in a C style, but cannot...
3
12413
by: majestik666 | last post by:
Hi, i'm bulding a multi platform app under windows/linux/osx an i have a bit of trouble exporting c++ symbols from a dynamic library... Under windows, i compile a dll exporting symbols using :...
2
1748
by: Bit Byte | last post by:
I have written a Dll which contains a class. I overload the "<<" opertor in global functions to perform Ostream operations - a follows: ostream &operator << (ostream &os, const struct _mystruct_t...
1
6265
by: =?Utf-8?B?RmFiaWFu?= | last post by:
Hello, I want to give multiple native classes (in different mixed mode dlls) access to a managed output window (for error messages). Therefore I wrote a native singleton with __declspec...
0
7391
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,...
1
7120
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
5697
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,...
1
5100
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...
0
4754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3247
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...
0
3235
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1609
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
809
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.