![]() |
|
|
|||||||
![]() |
Wireless Networking - Getting the name of the wifi-card for WZCQueryInterface and WZCSetInterface |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hi,
How can I find the name of the active wifi-card on ppc2003? I need it to set the network-mode from ad hoc to accesspoint. WZCSetInterface needs an INTF_ENTRY.wszGuid which is the devicename? I think I've got al the parts With WLanInfo.IntfEntry.dwCtlFlags & INTFCTL_CM_MASK you get the current value with if(iSelection == 2) { // Computer-to-computer s_mode = Ndis802_11IBSS; } else if(iSelection == 1) { // infrastructure (access point) network s_mode = Ndis802_11Infrastructure; } else if(iSelection == 0)\ { // Any network (access point preferred) s_mode = Ndis802_11AutoUnknown; } s_pWLanInfo->dwCtlFlags &= ~INTFCTL_CM_MASK; s_pWLanInfo->dwCtlFlags |= (((DWORD) s_mode) & INTFCTL_CM_MASK); you reset and replace the value with WZCQueryInterface( LPWSTR pSrvAddr, DWORD dwInFlags, PINTF_ENTRY pIntf, LPDWORD pdwOutFlags ) you get the current settings with you write the settings WZCSetInterface(NULL, s_pWLanInfo->dwCtlFlags,&pWLanInfo->IntfEntry,&dwOutFlags) But I still need a pSrvAddr and an IntfEntry.wszGuid How can I get them? I'm using evc4 Regards Laery Laery |
|
|
|
|
#2 |
|
Posts: n/a
|
Laery wrote:
> Hi, > > How can I find the name of the active wifi-card on ppc2003? > I need it to set the network-mode from ad hoc to accesspoint. > WZCSetInterface needs an INTF_ENTRY.wszGuid which is the devicename? I saw from another thread that you've downloaded the eval version of Platform Builder; take a look (in PUBLIC\COMMON\OAK\DRIVERS\NETSAMP) at the "wzctool" sample project. It's the best documentation of the WZC service I've found. -- Brian Bender Vocollect, Inc. Pittsburgh, PA, USA Brian |
|
|
|
#3 |
|
Posts: n/a
|
Well, you can get a list of adapter names via GetAdaptersInfo(). You can
then check each adapter's properties to see if it's an RF Ethernet adapter. There's no such thing as *the* active RF adapter. There might be ten active RF Ethernet adapters... Paul T. "Laery" <> wrote in message news: om... > Hi, > > How can I find the name of the active wifi-card on ppc2003? > I need it to set the network-mode from ad hoc to accesspoint. > WZCSetInterface needs an INTF_ENTRY.wszGuid which is the devicename? > > I think I've got al the parts > With > WLanInfo.IntfEntry.dwCtlFlags & INTFCTL_CM_MASK > you get the current value > > with > if(iSelection == 2) > { > // Computer-to-computer > s_mode = Ndis802_11IBSS; > } > else if(iSelection == 1) > { > // infrastructure (access point) network > s_mode = Ndis802_11Infrastructure; > } > else if(iSelection == 0)\ > { > // Any network (access point preferred) > s_mode = Ndis802_11AutoUnknown; > } > > s_pWLanInfo->dwCtlFlags &= ~INTFCTL_CM_MASK; > s_pWLanInfo->dwCtlFlags |= (((DWORD) s_mode) & INTFCTL_CM_MASK); > > you reset and replace the value > > with > WZCQueryInterface( LPWSTR pSrvAddr, > DWORD dwInFlags, > PINTF_ENTRY pIntf, > LPDWORD pdwOutFlags > ) > you get the current settings > > with > you write the settings > WZCSetInterface(NULL, > s_pWLanInfo->dwCtlFlags,&pWLanInfo->IntfEntry,&dwOutFlags) > > > But I still need a pSrvAddr and an IntfEntry.wszGuid > How can I get them? > > I'm using evc4 > Regards > Laery Paul G. Tobey [eMVP] |
|
|
|
#4 |
|
Posts: n/a
|
Yes, "wzctool" is good.
but the info is quite limited... Do you know how to get the list of avaliable ap ssid? thanks. "Brian" <> ¦b¶l¥ó news:Oj8YxZk$ ¤¤¼¶¼g... > Laery wrote: > > Hi, > > > > How can I find the name of the active wifi-card on ppc2003? > > I need it to set the network-mode from ad hoc to accesspoint. > > WZCSetInterface needs an INTF_ENTRY.wszGuid which is the devicename? > > > I saw from another thread that you've downloaded the eval version of > Platform Builder; take a look (in PUBLIC\COMMON\OAK\DRIVERS\NETSAMP) at > the "wzctool" sample project. It's the best documentation of the WZC > service I've found. > > -- > Brian Bender > Vocollect, Inc. > Pittsburgh, PA, USA Joe |
|
|
|
#5 |
|
Posts: n/a
|
The WZC API will do that. I've previously posted some code here that will
do that sort of thing. The OpenNETCF code (in C#), does it, also, and it shouldn't be too hard to port back to C++; that's where I started it from. www.opennetcf.org. Paul T. "Joe" <> wrote in message news:%232cwniv$... > Yes, "wzctool" is good. > but the info is quite limited... > > Do you know how to get the list of avaliable ap ssid? > > thanks. > > > "Brian" <> ¦b¶l¥ó > news:Oj8YxZk$ > ¤¤¼¶¼g... >> Laery wrote: >> > Hi, >> > >> > How can I find the name of the active wifi-card on ppc2003? >> > I need it to set the network-mode from ad hoc to accesspoint. >> > WZCSetInterface needs an INTF_ENTRY.wszGuid which is the devicename? >> >> >> I saw from another thread that you've downloaded the eval version of >> Platform Builder; take a look (in PUBLIC\COMMON\OAK\DRIVERS\NETSAMP) at >> the "wzctool" sample project. It's the best documentation of the WZC >> service I've found. >> >> -- >> Brian Bender >> Vocollect, Inc. >> Pittsburgh, PA, USA > > Paul G. Tobey [eMVP] |
|
![]() |
| Thread Tools | Search this Thread |
|
|