__declspec(dllexport) c++

G

Guest

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;
}
 
A

Armin Zingler

Luis said:
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
 
H

Herfried K. Wagner [MVP]

Luis said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top