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.
here are my understandings about this issue:
1. The fastest promised "response time" for updated information that you can get using NDIS API will be around 6 seconds.
2. If you need faster response time then this - you need to work wuth wireless NIC's drivers.
3. In order to check yourself, you may do some tests and from time to time switch the power of the transmitting AP on/off. when you switch it off - you will know exactly when the reading of the relevant AP should vanish from the list.
according to my tests, I could not make them disappear fast, i.e. the reading of the AP that is no longer on air, kept reporting as if it was on air, sometimes for about 1-2 minutes (!!!) after the AP was turned off. the rx database was not flushed and held old information.
This, of course, is not what I wanted.
The scan command, which should have flush the RXed AP's database, surely did not work.
I think that this problem is due to incompatibility of the Wireless card's vendors with NDIS requirements.
If you find any wireless card (NIC) that the NDIS SCAN command actually cleans the old data from the database, using NDIS interface, please inform me with the exact model of the wireless NIC.
If you find any wireless NIC that you can access it's Firmware and control it using your code (bypass the NDIS level), and that can do it with no cost (no need to pay for information on how to do this), please update me as well with the wireless card's model and brand, and with relevant sample code.
As a matter of fact, I think that in order to achieve fast response, this is that direction that you should focus on.
I either want to resolve this error or just suppress the error message since it doesn't provide any useful information.
The dialog message clearly states that it cannot find the file in question and thus the program cannot continue. You have also obliterated part of the directory path on your picture so it is not possible to tell if there is something else wrong with the path. You should use the debugger to trace through your program until you get to the point at which it tries to open the file and then check both the path that you are trying to open, and the path where the file is stored.
The program completes the extraction from the RGSSAD archive with no trouble, the error message doesn't appear until all the files in the archive are extracted, that's why the message is useless. There is nothing wrong with the path as the files that it says aren't there are indeed present and intact at that location.
If the code looks okay then I'm really stumped.
modified on Sunday, October 4, 2009 9:27 PM
Last Visit: 31-Dec-99 19:00 Last Update: 10-Dec-23 6:06