[prev in list] [next in list] [prev in thread] [next in thread] 

List:       winpcap-users
Subject:    [Winpcap-users] Compiling samples in Doc with VC++ 2005
From:       gianluca.varenni () cacetech ! com (Gianluca Varenni)
Date:       2006-01-06 19:31:39
Message-ID: 0b9701c612f7$ca738bf0$1a4da8c0 () NELSON2
[Download RAW message or body]

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@yahoo.com.au>
To: <winpcap-users@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@winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic