Go Back   Velocity Reviews > Newsgroups > Wireless Networking
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Wireless Networking - Getting the name of the wifi-card for WZCQueryInterface and WZCSetInterface

 
Thread Tools Search this Thread
Old 01-19-2005, 12:46 PM   #1
Default Getting the name of the wifi-card for WZCQueryInterface and WZCSetInterface


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
  Reply With Quote
Old 01-19-2005, 04:46 PM   #2
Brian
 
Posts: n/a
Default Re: Getting the name of the wifi-card for WZCQueryInterface andWZCSetInterface
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
  Reply With Quote
Old 01-19-2005, 05:33 PM   #3
Paul G. Tobey [eMVP]
 
Posts: n/a
Default Re: Getting the name of the wifi-card for WZCQueryInterface and WZCSetInterface
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]
  Reply With Quote
Old 01-20-2005, 02:02 PM   #4
Joe
 
Posts: n/a
Default Re: Getting the name of the wifi-card for WZCQueryInterface and WZCSetInterface
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
  Reply With Quote
Old 01-20-2005, 05:02 PM   #5
Paul G. Tobey [eMVP]
 
Posts: n/a
Default Re: Getting the name of the wifi-card for WZCQueryInterface and WZCSetInterface
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]
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46