|
What "scan wireless network" means enum all avalible 802.11b wireless network on air.
Sometime, there are more than one AP (access point) or Adhoc network avalible on air. I want to enum all the avalible network and then let user choose to connect one of them.
DavidCrow wrote:
What do you mean by "scan wireless network?"
|
|
|
|
|
Take a look at the DDK documentation for 802_11 OIDs. For example, an application can send OID_802_11_SCAN_LIST to ask the miniport driver to do active or passive scan. This list is then returned to the application. User Mode applications cannot send OIDs directly to the miniport therefore you have to have a protocol driver in between to do this correctly. On Xp the zero config service uses a variation of "User Mode I/O" protocol driver (in the DDK Samples) to send these OIDs. Some vendors implement private IOCTL codes in the miniport, in that case application can just send IOCTLs directly to the miniport.
|
|
|
|
|
thank you very much, it sounds ok, i will try this way.
|
|
|
|
|
Thank you very much for your help.
After I studied some DDK documents, I relized you r a real expert in this area!
Since WinXP introduced a WZC service, does this mean in an XP box, I needn't write a NDISUIO driver myself, instead I can use WZC to do everything I want?
However I searched MS site and found very few information on WZC, almost get no information on how to use WZC service at all. Could you give me more tips?
Thanks so!
|
|
|
|
|
Does anyone know how to change network and adapter setting in a MFC program?
It can be easily done by hand, just right click on a network connection and select "Properties" to make changes. However how to do that in a program?
I found a very useful program by IBM, named "Access Connection" (http://www.pc.ibm.com/qtechinfo/MIGR-4ZLNJB.html?doctype=Downloadable+files) can do this. I am trying to write a simular program.
Any help is appreciated!
|
|
|
|
|
I hope this is what you are searching ...
eg. to alter the ip - adress
You need to open a key like (for WinNT):
sKey = _T("SOFTWARE\\Microsoft\\
Windows NT\\CurrentVersion\\NetworkCards");
res = RegOpenKeyEx(HKEY_LOCAL_MACHINE, sKey, 0, KEY_READ,
&hKey);
if (res != ERROR_SUCCESS) goto LAB_X;
- Imake it a little bit shorter -
then enumerate the adapter of your choice by
RegEnumKeyEx
the 'ServiceName' - key ist the important - it is something like '{EE0A056F-1C40-4995-B7EB-E47E2C1E0A27}'
combine the path to the service-interface
'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\'
with the '{EE0A056F-1C40-4995-B7EB-E47E2C1E0A27}'
and you will find the key 'IPAddress'.
it is a MULTI_SZ, so editing is a little bit harder - but change the value and it is applied
good luck ...
|
|
|
|
|
Thanks but I am not only intend to change the IP address.
I am focused on changing network adapter's advanced settings.
|
|
|
|
|
Metric is in the same folder,
subnetmask, Gateway, ...
just alter the values in the registry. If it works you can programm it ...
Activation and Disabling of the adapter is a little bit tricky.
Maybe I totally misunderstood
by
|
|
|
|
|
Is there any API provide such things? If we have any API it will be more helpful.
or Does it have any other way to do this?
Pls help me.
Thanx in advance.
regards
Halid
|
|
|
|
|
Hi all,
I am wondering that the following is working. When will the temporary string, created in the constructor, destroyed? After constructor call or after object destroyed? Am I right that c_str() returns only the pointer and not copy char string? Is it a safe program or not?Thanx for your time,
#include <string>
#include <iostream.h>
#include <stdlib.h>
#include <stdio.h>
class a
{
public:
const char * name;
a(const char * name_ ):name(name_){};
void print() {cout<
|
|
|
|
|
Ilia Oussorov wrote:
When will the temporary string, created in the constructor, destroyed? After constructor call or after object destroyed?
The 'name' variable belongs to the constructor, not the class itself. Therefore, it will lose validity when the constructor goes out of scope.
|
|
|
|
|
Why the program is working? Can you demonstrate this?
|
|
|
|
|
I see nothing that indicates that it won't work (this from just a cursory glance), although I'm not sure what it is trying to do.
|
|
|
|
|
Sorry, I have to explain it more exact.
a oa( ((string)"aaa"+(string)"bbb").c_str());
above line passes the pointer on temporary object ( of type const char*) to the constructor. After the end of constructor this object (character seq"aaabbb") should lose validity as you wrote.
But next line oa.print() prints correct object. Is it only a luck, that the memory was not overwritten or temporary object still exists?
If you mean this is a luck, I would very appreciate the suggestion how to demonstrate this
|
|
|
|
|
Ilia Oussorov wrote:
Is it only a luck, that the memory was not overwritten
Correct.
Ok, upon examining your code more closely, my last responses were less than accurate. Sorry about that. Some of your code was lost because of HTML formatting so I wasn't sure if the missing code was intentional or not.
The only way to guarantee that the print() method works is to allocate memory to the name member variable and copy the contents of the name_ parameter to it.
|
|
|
|
|
I use RTX(real time extension)to Pragram. after connected the shared memery, I save a value in the parameter of the shared memery. but when the program runs, the informationg"RTX NT Starvation Timeout(5000 MS). All RTSS processes stopped Debug and/or use "RTSSkill"command to unload all process images.(Poc=809799C8,Thread=807A8930)" comes allways. what's the reason?
|
|
|
|
|
Hi friends,
I want to place the cursor in a Text Box when the dialog box displayed asking for user name and password, default there is no cursor, How to do this??
Thanks in advance
Regards,
Satya
|
|
|
|
|
Or, call GotoDlgCtrl(GetDlgItem(IDC_MY_EDIT_CTRL)) in OnInitDialog and return FALSE.
onwards and upwards...
|
|
|
|
|
Hi WiB,
I couldn't get what U told, How to set the tab order, can u explain. What will happen if I change the return value.
Thank You,
Satya
|
|
|
|
|
hi i want to detect the presence of network (internet , lan ) , how do i approach.
need some some sortof driver event that is fired as soon as the net is there.
e.g as soon as u put LAN cable in card , your nework gets activated.
for e,g ICQ , as soon as u are connected , it logs in.
any detailed ideas.
regards
TIA
t
|
|
|
|
|
See if this helps:
http://www.pcausa.com/resources/InetActive.txt
|
|
|
|
|
Hello,
I have a text file with the following layout.
COMMAND1
ITEM1 Value1 Value2 Value3 Valu4
ITEM2 Value1 Value2 Value3 Valu4
ITEM3 Value1 Value2 Value3 Valu4
ITEM4 Value1 Value2 Value3 Valu4
...
ITEM_N
COMMAND2
ITEM1 Value1 Value2 Value3 Valu4
ITEM2 Value1 Value2 Value3 Valu4
ITEM3 Value1 Value2 Value3 Valu4
ITEM4 Value1 Value2 Value3 Valu4
...
ITEM_N
COMMAND3
ITEM1 Value1 Value2 Value3 Valu4
ITEM2 Value1 Value2 Value3 Valu4
ITEM3 Value1 Value2 Value3 Valu4
ITEM4 Value1 Value2 Value3 Valu4
...
ITEM_N
....
COMMAND_N
In this file, I have to insert new items, or change values of items or delete existing items.
For suppose if I want to insert new item under "COMMAND1", what I am doing is, seeking the pointer to the end of "COMMAND1", writing remainig text into a temporary file, inserting my new text, then appending the text which is stored in temporary file. But I guess, it is not a best method. It takes much time every time I insert/edit text.
Is there any other alternative to do this. Can anybody tell what is the best method to do this.
Thanks & regards,
Chito
|
|
|
|
|
Well the assumption is rather correct but there is too many calls to the file. you should read the content of the file to the memory. Then do all the opertions (parsing, reallocation etc) and then the buffer (with the new value) should be written to the file again.
The content fo your file looks like it can be easly stored by xml. And will be easier to parse.
Have a good day
|
|
|
|
|
One solution is file-mapping.
Kuphryn
|
|
|
|
|
i create a regular dll named MyDll using MFC, i want the dll popup a dialg in
the beginning of the function CMyDllApp::InitInstance() ,just as i did in my exe. but here caused serious error in wincore.cpp (line:884)
BOOL CMyDllApp::InitInstance()
{
// TODO: Add your specialized code here and/or call the base class
CDlg dlg;
dlg.DoModal();
return CWinApp::InitInstance();
}
who can tell me what's wrong to my program?
gucy
|
|
|
|