[Winpcap-users] Compiling samples in Doc with VC++ 2005
Gianluca Varenni
gianluca.varenni at cacetech.com
Fri Jan 6 19:31:28 GMT 2006
Hi Craig.
What you have created is an application using managed C++ (is it still
called managed extensions? I know that the new C++ managed extensions in
VS2005 are
*way* different from the ones in VC2002/2003).
By looking at the documentation of C3641 and the project created by VC2005
choosing "Windows Forms", it seems that the default project uses the
"/clr:pure", that does not support some Interop scenarios (in particular,
from a quick read at the MSDN documentation, you can use P/Invoke, but not
the native C++ Interop features). More documentation can be found here:
http://msdn2.microsoft.com/en-us/library/85344whh.aspx
A quick solution to the problem is to switch from "/clr:pure" to "/clr":
- go to the project properties
- choose "Configuration Properties"
- change the property "Common Language Runtime support" from "Pure MSIL
Common Language Runtime Support" to "Common Language Runtime Support"
Hope it helps
GV
----- Original Message -----
From: "Craig Bumpstead" <cbumpste at yahoo.com.au>
To: <winpcap-users at winpcap.org>
Sent: Saturday, December 31, 2005 9:54 PM
Subject: [Winpcap-users] Compiling samples in Doc with VC++ 2005
Hi,
I created a project that is of type "Windows Forms".
Replaced the printf statments with MessageBox.
I have set the options as listed in the documentation
"Using WinPcap in your programs" but it fails to
compile and has the following error:
C:\Program Files\Microsoft Visual Studio
8\VC\PlatformSDK\include\wspiapi.h(126) : error C3641:
'WspiapiParseV4Address' : invalid calling convention
'__stdcall ' for function compiled with /clr:pure or
/clr:safe
Cheers,
Craig
Send instant messages to your online friends http://au.messenger.yahoo.com
_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users
More information about the Winpcap-users
mailing list