Fehlermeldungen setupapi.h Einbindung
-
Hi,
wer kann helfen.
Ich versuche , eine Kommunikation über eine USB-Schnittstelle unter MVC++ V. 2010 aufzubauen.
Die zugehörigen
setupapi.h, setupapi.lib, setupapi.dll sind eingebunden und gelinkt.Beim Compilieren werden ff. Fehlermeldungen angezeigt: (ev. Kompatibilität?)
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\prsht.h(198): error C2146: syntax error : missing ';' before identifier 'dwSize'
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\prsht.h(198): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\prsht.h(456): error C2065: 'HWND' : undeclared identifier
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\prsht.h(456): error C2065: 'UINT' : undeclared identifier
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\prsht.h(456): error C2065: 'LPARAM' : undeclared identifierDie Fehler C2146 und C4430 setzen sich mehrere Male fort.
-
windows.h Datei zuvor includen...
-
..besten Dank für die Info.
Leider behebt das include #include<windows.h" das Problem nicht.
Muss es in einer speziellen Klasse eingebunden sein?
THX.
-
#include<windows.h" <--- dat kann auch net gehn
entweder: #include "windows.h"
oder #include <windows.h>
-
...war nur en tippfehler hier im forum,im quellcode ist es natürlich richtig
-
Code Zeigen...
-
Für ev. Vorschläge bin ich sehr dankbar
//Eingangsdeklarationen der setupapi.h//
#include <windows.h>
#ifndef _INC_SETUPAPI
#define _INC_SETUPAPI//
// Define API decoration for direct importing of DLL references.
//
#if !defined(_SETUPAPI_)
#define WINSETUPAPI DECLSPEC_IMPORT
#else
#define WINSETUPAPI
#endif#include <pshpack1.h> // Assume byte packing throughout
#ifdef __cplusplus
extern "C" {
#endif#ifndef __LPGUID_DEFINED__
#define __LPGUID_DEFINED__
typedef GUID *LPGUID;
#endif
///////////////....../////////////////////////////////