c++visual-studio-2010winapiwfp

Error including fwpmu.h in Visual Studio 2010


I'm trying to call some WFP functions from a C++ CLR class library (New Project -> Visual C++ -> CLR -> Class Library)

Code:

#include <windows.h>
#include <fwpmu.h>
#pragma comment (lib, "fwpuclnt.lib")

With only that, many include files from the Windows SDK fail to compile. What am I missing?

Example:

Error 12 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (program files)\microsoft sdks\windows\v7.0a\include\fwptypes.h 336 1 testlib

Edit:

I found the solution, it's a bug in some header files: http://social.msdn.microsoft.com/Forums/en/wfp/thread/8fd93a3d-a794-4233-9ff7-09b89eed6b1f

And a conflict between the CLR and another header: http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/92c473d6-c963-44fa-9150-6c6af502112b


Solution

  • I found the solution, it's a bug in some header files: http://social.msdn.microsoft.com/Forums/en/wfp/thread/8fd93a3d-a794-4233-9ff7-09b89eed6b1f

    And a conflict between the CLR and another header: http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/92c473d6-c963-44fa-9150-6c6af502112b