__declspec(dllexport) c++

  • Thread starter Thread starter Guest
  • Start date Start date
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;
}
 
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
 
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.
 
Back
Top