I get 5 or 6 when I try to compile this (VC6, 2003 Platform SDK). The switch statement is screwed up, you're using non-existing window styles, typos, etc.
All I see is a pretty standard Win32 application skeleton that just creates a window and a message loop. Well, it would if you fixed all the obvious errors.
Don't get me wrong - I don't want to discourage you from writing this program but you're getting way ahead of yourself. Once you really understand what the above code does (and know how to fix the errors) you can start putting in your own code.
I suggest you start with MSDN[^], which has information on just about everything you need to write Windows applications. Read articles here on Code Project, as I said before there are some excellent beginner's guides. Use Google to search for specifics on the subjects you are interested in.
Above all understand that no project can be produced without a lot of hard work.
I really don't understand what you are saying. I could not find WM_CREATE message in my code anywhere.
Could you write the line of code just quickly so I see how it works and I will figure out where to put it.
Andrew, from the structure of your sentences I suspect that English is your first language. However from the content, including the second line above, I would suspect that you are very much a beginner to Windows programming, possibly C++, and possibly even programming itself. You seem to be approaching this problem in totally the wrong way, as you seem to believe that you are going to create this project by asking questions on this forum and building the program one line at a time, without really understanding the code you are putting together. I have recommended you a number of times to buy some books, use the tutorials on this site (and MSDN and Google) to learn the basics and write some simple programs so that you can at least understand the concepts of windows, dialogs, message passing, menus, controls etc.
You may be under the misapprehension that people here are being delibarately obstructive in their answers; nothing could be further from the truth. Everyone here wants to help each other, but they can only help you fix things after you have created your program(s). Nobody here has the time to write your code, or teach you how to do it.
I wrote a program using VC++ that should scan for available wireless networks in the area.
In my SW I use the commands OID_802_11_BSSID_LIST_SCAN and OID_802_11_BSSID_LIST.
My questions are:
1. How can I Force the Wireless NIC to do ACTIVE SCAN (as contrary to PASSIVE scan) ?
2. According to tests that I did, the card does not flush the list between scans, i.e. I get for several scan a result of an AP that was on air during an old scan, but is no longer there, and new scans return's it's data as if it is still there.
A code part that I used is attached - in order to illustrate which functions I am using.
m_pBSSIDList = (NDIS_802_11_BSSID_LIST *) VirtualAlloc (NULL,
sizeof (NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS,
MEM_RESERVE | MEM_COMMIT,
memset (m_pBSSIDList, 0, sizeof (NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS);
// Do Scan
oidcode = OID_802_11_BSSID_LIST_SCAN;
(ULONG *) NULL,
Sleep (6100); // According to the documentation the result of the scan should be valid after 6 seconds.// The original line was delay of 2000 mSec. find out why...//Sleep (2000);// Read scan results
oidcode = OID_802_11_BSSID_LIST;
if (DeviceIoControl( m_handle,
(ULONG *) m_pBSSIDList,
sizeof(NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS,
NULL) == 0)
// List failedreturn NULL;
If you have any idea of how can I solve my problems, or if you see that I forgot any important line- please let me know.
I am open to hear about completely new ways to do this. only requirement is that I will use VC++.
it answered my first question, but the second question, that bothers me much more is still left unanswered.
My problem is that the Wireless Card returns old scanned data, that is no longer relevant, of APs that are no longer on air.
"...The miniport driver must manage its cached BSSID scan list in the following ways:<br />
* The driver must clear its BSSID scan list when set by OID_802_11_BSSID_LIST_SCAN before it starts the explicit network scan.<br />
I tried my code, which uses the OID_802_11_BSSID_LIST_SCAN command, on 2 different Wireless NICs (DELL, and Intel) and both Wireless NICs did not clear the history and kept returning the result of old scanned APs that are no longer on air.
I also got the confusion with this question, when I want collect each AP's RSSI real-time.
The miniport driver must manage its cached BSSID scan list in the following ways:
The driver must clear its BSSID scan list when set by OID_802_11_BSSID_LIST_SCAN
before it starts the explicit network scan.
Because we use the OID in the upper layer of the system. The Application just pass down the OID to the under miniport driver. It seems that the driver will do the clear things for us. The actual implement of the hardware is variety, so it is unforeseen.
Last Visit: 31-Dec-99 18:00 Last Update: 27-Sep-23 9:44