J
Jochen Kalmbach [MVP]
Hi bonk!
If you compile with /clr, then all methods/functions are compiled into
MSIL, therefor they will always use __clrcall as calling convention.
If you want to have __stdcall or __cdecl then you need to compile into
native code.
So please add the
#pragma unmanaged
to the region of code, you want to export.
--
Greetings
Jochen
My blog about Win32 and .NET
http://blog.kalmbachnet.de/
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 the /CLR).
As soon as I try to specify __declspec(dllexport) (AFX_EXT_CLASS) I get
the following compiler error:
Error 2 error C3395: 'CWPFControlProxy::OnWPFButtonClick' :
__declspec(dllexport) cannot be applied to a function with the __clrcall
calling convention g:\robert_d\visual studio
2005\projects\wpfcontrols\wpfcontrols\WPFControlProxy.h 28
Could you explain what this error means and what I can do against it? I
don't see a __clrcall definition anywhere in my project ...
If you compile with /clr, then all methods/functions are compiled into
MSIL, therefor they will always use __clrcall as calling convention.
If you want to have __stdcall or __cdecl then you need to compile into
native code.
So please add the
#pragma unmanaged
to the region of code, you want to export.
--
Greetings
Jochen
My blog about Win32 and .NET
http://blog.kalmbachnet.de/