开发者

Can DLL be used with Windows Form applications [duplicate]

开发者 https://www.devze.com 2023-03-22 08:52 出处:网络
开发者_开发技巧This question already has answers here: Closed 11 years ago. Possible Duplicate: How do I DllExport a C++ Class for use in a C# Application
开发者_开发技巧This question already has answers here: Closed 11 years ago.

Possible Duplicate:

How do I DllExport a C++ Class for use in a C# Application

I want to use my functions in DLL files in Windows Form based Application. Is it possible and if yes, Then please post a suitable tutorial as i am getting the following error when trying to do so with one of the DIVIDE function in DLL:

..\Visual Studio 2010\Projects\test\MathFuncsDll\MathFuncsDll.h(19): error C3395: 'MathFuncs::MyMathFuncs::Divide' : __declspec(dllexport) cannot be applied to a function with the __clrcall calling convention


In managed C++ (which I assume it is, since you are using __clrcall) you don't have to export functions for them to be visible. Anything made public (in a public class) is exported automatically, as in other .NET languages.

0

精彩评论

暂无评论...
验证码 换一张
取 消