Hendrawan Ashari

Hii i want to build application with Wifi API. And i get example about Wifi in C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\NetDs\wlan\AutoConfig.
But while i copy code to my Project (i am build project from File > New Project > Windows Forms Application), i get many error.
Someone can help me please


Re: Windows SDK wifi api (native Wifi) on Visual C++ 8

Ramkrishna Pawar

What errors






Re: Windows SDK wifi api (native Wifi) on Visual C++ 8

Hendrawan Ashari

I just add
#include <wlanapi.h>
in my code

This the error
Code Snippet

Error 1 error C2146: syntax error : missing ';' before identifier 'NotificationSource' C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 78
Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 78
Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 78
Error 4 error C2146: syntax error : missing ';' before identifier 'NotificationCode' C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 79
Error 5 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 79
Error 6 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 79
Error 7 error C2146: syntax error : missing ';' before identifier 'InterfaceGuid' C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 80
Error 8 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 80
Error 9 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 80
Error 10 error C2146: syntax error : missing ';' before identifier 'dwDataSize' C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 81
Error 11 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 81
Error 12 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 81
Error 13 error C2061: syntax error : identifier 'dwDataSize' C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 86
Error 14 error C3646: 'PVOID' : unknown override specifier C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 86
Error 15 error C3646: 'pData' : unknown override specifier C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 86
Error 16 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 86
Warning 17 warning C4183: '__field_bcount': missing return type; assumed to be a member function returning 'int' C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\l2cmn.h 86
Error 18 error C2146: syntax error : missing ';' before identifier 'NDIS_OID' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 80
Error 19 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 80
Error 20 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 80
Error 21 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 80
Error 22 error C2143: syntax error : missing ';' before '<class-head>' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 89
Error 23 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 89
Error 24 error C2146: syntax error : missing ';' before identifier 'Oid' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 90
Error 25 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 90
Error 26 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 90
Error 27 error C2146: syntax error : missing ';' before identifier 'Data' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 92
Error 28 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 92
Error 29 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 92
Error 30 error C2146: syntax error : missing ';' before identifier 'Length' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 100
Error 31 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 100
Error 32 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 100
Error 33 error C2146: syntax error : missing ';' before identifier 'MaximumLength' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 101
Error 34 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 101
Error 35 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 101
Error 36 error C2146: syntax error : missing ';' before identifier 'Offset' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 102
Error 37 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 102
Error 38 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 102
Error 39 error C2146: syntax error : missing ';' before identifier 'NDIS_802_11_MAC_ADDRESS' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 815
Error 40 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 815
Error 41 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 815
Error 42 error C2146: syntax error : missing ';' before identifier 'Bssid' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 833
Error 43 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 833
Error 44 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 833
Error 45 error C2146: syntax error : missing ';' before identifier 'NDIS_802_11_RSSI' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 866
Error 46 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 866
Error 47 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 866
Error 48 error C2146: syntax error : missing ';' before identifier 'TransmittedFragmentCount' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 888
Error 49 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 888
Error 50 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 888
Error 51 error C2146: syntax error : missing ';' before identifier 'MulticastTransmittedFrameCount' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 889
Error 52 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 889
Error 53 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 889
Error 54 error C2146: syntax error : missing ';' before identifier 'FailedCount' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 890
Error 55 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 890
Error 56 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 890
Error 57 error C2146: syntax error : missing ';' before identifier 'RetryCount' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 891
Error 58 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 891
Error 59 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 891
Error 60 error C2146: syntax error : missing ';' before identifier 'MultipleRetryCount' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 892
Error 61 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 892
Error 62 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\ntddndis.h 892


................ cut text because max length of input is 50000 characters ..........


Error 288 error C2059: syntax error : 'constant' C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\windot11.h 70
Error 289 error C3646: 'UCHAR' : unknown override specifier C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\windot11.h 70
Error 290 fatal error C1003: error count exceeds 100; stopping compilation C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\windot11.h 70







Re: Windows SDK wifi api (native Wifi) on Visual C++ 8

Hendrawan Ashari

Now I have include some header
#include <windows.h>
#include <conio.h>
#include <objbase.h>
#include <rpcsal.h>
#include <objbase.h>
#include <msxml6.h>
#include <atlbase.h>
#include <iostream>
#include <iomanip>
// headers needed to use WLAN APIs
#include <wlanapi.h>

and i still get error, the error
Code Snippet

Error 1 error C3641: 'InterlockedExchangePointer' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h 90
Error 2 error C3641: 'ATL::_AtlGetThreadACPFake' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h 104
Error 3 error C3641: 'ATL::_AtlGetThreadACPReal' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h 130
Error 4 error C3641: 'ATL::_AtlGetThreadACPThunk' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h 137
Error 5 error C2440: '=' : cannot convert from 'UINT (__clrcall *)(void) throw()' to 'ATL::ATLGETTHREADACP' C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h 147
Error 6 error C2440: '=' : cannot convert from 'UINT (__clrcall *)(void) throw()' to 'ATL::ATLGETTHREADACP' C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h 151
Error 7 error C3641: 'ATL::_AtlGetConversionACP' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h 158
Error 8 error C3641: 'AtlA2WHelper' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h 594
Error 9 error C3641: 'AtlW2AHelper' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h 613
Error 10 error C3641: 'AtlA2WHelper' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h 631
Error 11 error C3641: 'AtlW2AHelper' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h 636
Error 12 error C3641: 'AtlDevModeW2A' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlconv.h 589
Error 13 error C2440: 'default argument' : cannot convert from 'int (__cdecl *)(int,const char *,int,const char *,const char *,...)' to 'ATL::CTrace::fnCrtDbgReport_t' C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atltrace.h 64
Error 14 fatal error C1903: unable to recover from previous error(s); stopping compilation C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atltrace.h 143







Re: Windows SDK wifi api (native Wifi) on Visual C++ 8

Raghu_m25

download windows SDK (Fullversion) for vista.

you have to either have vista or XP. my reco is vista.

after downloading sdk and installing it

in your project u have to include additional libraries
as C:/..../Microsoft sdks/../lib/

and also "include" in the project would help


raghu