Re: How to stop WZC Service in XP-SP2

Tech-Archive recommends: Fix windows errors by optimizing your registry



Yes , that way ,but did you change the struct as in link I wrote, btw the
function returned me error but did the job , I wrote about that
Arkady

"John K Gummadi" <john@xxxxxxxxxx> wrote in message
news:uqIwC2PQFHA.3544@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Akardy,
>
> Yes, I did (I replied to your mail-id). Thanks agian. I've got one more
> question, can you please have a look?
> //////////////////////////////////// Code
> ////////////////////////////////////////////////////
> DWORD dwStatus = WZCQueryInterface(NULL, INTF_ALL, &ie, &dwOutFlags);
> CString szDesc = ie.wszDescr;
> msg.Format("StopWZCService: After WZCQueryInterface, \nwszDescr = %s
> \nStatus = %d
> \ndwOutFlags = %d \nCtlFlags = %d", szDesc, dwStatus,
> dwOutFlags, ie.dwCtlFlags);
> //Gives me Description properly! So, I assume WZCQueryInterface worked
> AfxMessageBox(msg);
>
> //Now, to disable WZC for this adapter, I do the following..
> ie.dwCtlFlags &= ~INTF_ENABLED;
> dwStatus = WZCSetInterface(NULL, INTF_ALL, &ie, &dwOutFlags);
> msg.Format("StopWZCService: After WZCSetInterface, Status = %d
> \ndwOutFlags
> = %d \nCtlFlags = %d",
> dwStatus, dwOutFlags, ie.dwCtlFlags);
> AfxMessageBox(msg);
> ////////////////////////////////////////////////////////////////////////////
> ////////////
>
> // WZCSetInterface returns zero (which I suppose is SUCCESS) but I still
> can't get "IOCTL_NDISUIO_OPEN_DEVICE" to work. It returns 170 ("The
> requested resource is in use.").
>
> Is this how I should be doing with WZCSetInterface? Am I missing
> something?
>
> Thanks,
>
> John.
>
>
> "Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message
> news:e9TOpNPQFHA.2520@xxxxxxxxxxxxxxxxxxxxxxx
>> I believe that you received the H :)
>> Arkady
>>
>>
>> "John K Gummadi" <john@xxxxxxxxxx> wrote in message
>> news:eOXFdoOQFHA.1392@xxxxxxxxxxxxxxxxxxxxxxx
>> > Thanks a lot for the help Akardy!
>> >
>> > -John.
>> >
>> > "Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message
>> > news:O9vRFFOQFHA.3356@xxxxxxxxxxxxxxxxxxxxxxx
>> >> Here raw_data , in a moment I'll send you the file
>> >>
>> >> Arkady
>> >>
>> >> //---------------------------------------
>> >>
>> >> // [P]RAW_DATA: generic description of a BLOB
>> >>
>> >> typedef struct
>> >>
>> >> {
>> >>
>> >> DWORD dwDataLen;
>> >>
>> >> #if defined(MIDL_PASS)
>> >>
>> >> [unique, size_is(dwDataLen)] LPBYTE pData;
>> >>
>> >> #else
>> >>
>> >> LPBYTE pData;
>> >>
>> >> #endif
>> >>
>> >> } RAW_DATA, *PRAW_DATA;
>> >>
>> >> "John K Gummadi" <john@xxxxxxxxxx> wrote in message
>> >> news:O$KLXsNQFHA.1884@xxxxxxxxxxxxxxxxxxxxxxx
>> >> > "wzcapi.h" please, anyone???
>> >> >
>> >> > "John K Gummadi" <john@xxxxxxxxxx> wrote in message
>> >> > news:uIpJFGNQFHA.2972@xxxxxxxxxxxxxxxxxxxxxxx
>> >> >> Akardy,
>> >> >>
>> >> >> I agian have compile problems with "RAW_DATA". Can you give me the
>> > header
>> >> >> file (wzcapi.h ) please?
>> >> >>
>> >> >> My mail ID: john@xxxxxxxxxx
>> >> >>
>> >> >> Thanks,
>> >> >>
>> >> >> John.
>> >> >>
>> >> >>
>> >> >> "John K Gummadi" <john@xxxxxxxxxx> wrote in message
>> >> >> news:e1nlm0MQFHA.3704@xxxxxxxxxxxxxxxxxxxxxxx
>> >> >> > Thanks a lot! Will bug you again if I get problems in
>> >> >> > implementing
>> > that
>> >> >> :-)
>> >> >> >
>> >> >> > -John.
>> >> >> >
>> >> >> > "Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message
>> >> >> > news:#93UfvMQFHA.3196@xxxxxxxxxxxxxxxxxxxxxxx
>> >> >> > > That from wzcapi.h :
>> >> >> > >
>> >> >> > > //---------------------------------------
>> >> >> > >
>> >> >> > > // [P]INTF_ENTRY: contains everything an RPC client needs to
> know
>> >> >> > >
>> >> >> > > // about an interface. It is used in conjunction with
>> >> > RpcQueryInterface.
>> >> >> > >
>> >> >> > > // Flags below are to be used to specify what info is queried
> for
>> > the
>> >> >> > >
>> >> >> > > // interface. Guid field is not covered since this is the key
>> >> >> > > of
>> > the
>> >> >> > >
>> >> >> > > // structure so it has to be specified eather way.
>> >> >> > >
>> >> >> > > typedef struct
>> >> >> > >
>> >> >> > > {
>> >> >> > >
>> >> >> > > #if defined(MIDL_PASS)
>> >> >> > >
>> >> >> > > [string] LPWSTR wszGuid;
>> >> >> > >
>> >> >> > > #else
>> >> >> > >
>> >> >> > > LPWSTR wszGuid;
>> >> >> > >
>> >> >> > > #endif
>> >> >> > >
>> >> >> > > #if defined(MIDL_PASS)
>> >> >> > >
>> >> >> > > [string] LPWSTR wszDescr;
>> >> >> > >
>> >> >> > > #else
>> >> >> > >
>> >> >> > > LPWSTR wszDescr;
>> >> >> > >
>> >> >> > > #endif
>> >> >> > >
>> >> >> > > ULONG ulMediaState;
>> >> >> > >
>> >> >> > > ULONG ulMediaType;
>> >> >> > >
>> >> >> > > ULONG ulPhysicalMediaType;
>> >> >> > >
>> >> >> > > INT nInfraMode;
>> >> >> > >
>> >> >> > > INT nAuthMode;
>> >> >> > >
>> >> >> > > INT nWepStatus;
>> >> >> > >
>> >> >> > > DWORD dwCtlFlags; // control flags (see INTFCTL_* defines)
>> >> >> > >
>> >> >> > > DWORD dwCapabilities; // capabilities flags (see INTFCAP_*
>> >> >> > > defines)
>> >> >> > >
>> >> >> > > RAW_DATA rdSSID; // encapsulates the SSID raw binary
>> >> >> > >
>> >> >> > > RAW_DATA rdBSSID; // encapsulates the BSSID raw binary
>> >> >> > >
>> >> >> > > RAW_DATA rdBSSIDList; // encapsulates one
>> >> >> > > WZC_802_11_CONFIG_LIST
>> >> >> structure
>> >> >> > >
>> >> >> > > RAW_DATA rdStSSIDList; // encapsulates one
> WZC_802_11_CONFIG_LIST
>> >> >> > structure
>> >> >> > >
>> >> >> > > RAW_DATA rdCtrlData; // data for various control actions on the
>> >> >> interface
>> >> >> > >
>> >> >> > > #ifdef UNDER_CE
>> >> >> > >
>> >> >> > > BOOL bInitialized; // To track caller that freeing
>> >> >> > >
>> >> >> > > // the same structure more than one time..
>> >> >> > >
>> >> >> > > #endif
>> >> >> > >
>> >> >> > > DWORD nWPAMCastCipher;
>> >> >> > >
>> >> >> > > } INTF_ENTRY, *PINTF_ENTRY;
>> >> >> > >
>> >> >> > > "John K Gummadi" <john@xxxxxxxxxx> wrote in message
>> >> >> > > news:O%234FBsMQFHA.576@xxxxxxxxxxxxxxxxxxxxxxx
>> >> >> > > > Thanks Akardy,
>> >> >> > > >
>> >> >> > > > I have read that topic and what I need is the basic structure
>> >> > itself.
>> >> >> > This
>> >> >> > > > is what you mentioned there:
>> >> >> > > > typedef struct {
>> >> >> > > > // all data here
>> >> >> > > > BYTE various_extensions[12];
>> >> >> > > > } INTF_ENTRY;
>> >> >> > > >
>> >> >> > > > Can you please give me the original structure (including "all
>> >> >> > > > data")
>> >> >> > > > please?
>> >> >> > > >
>> >> >> > > > Thanks,
>> >> >> > > >
>> >> >> > > > John.
>> >> >> > > >
>> >> >> > > >
>> >> >> > > > "Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message
>> >> >> > > > news:OrYVUnMQFHA.4020@xxxxxxxxxxxxxxxxxxxxxxx
>> >> >> > > >> wzcsapi.h in CE you can have only if you have platform
> builder
>> > and
>> >> >> not
>> >> >> > > >> eVC
>> >> >> > > >> (eVT ) and that the same for XP up to SP2 , where the struct
>> >> >> > > >> was
>> >> >> > changed
>> >> >> > > >> ,
>> >> >> > > >> look at
>> >> >> > > >>
>> >> >> > > >
>> >> >> >
>> >> >>
>> >> >
>> >
> http://groups-beta.google.com/group/microsoft.public.win32.programmer.networ
>> >> >> > > >
>> >> >> >
>> >> >>
>> >> >
>> >
> ks/browse_thread/thread/8ca9722da4870f0a/a925a934bc215987?q=arkadyf+INTF_ENT
>> >> >> > > > RY&rnum=2#a925a934bc215987
>> >> >> > > >> Arkady
>> >> >> > > >>
>> >> >> > > >> "John K Gummadi" <john@xxxxxxxxxx> wrote in message
>> >> >> > > >> news:eD3M12DQFHA.3928@xxxxxxxxxxxxxxxxxxxxxxx
>> >> >> > > >> > Hello All,
>> >> >> > > >> >
>> >> >> > > >> > I'm working on a WiFi tool that scans, connects to
>> > accesspoints,
>> >> >> > etc.,
>> >> >> > > > So
>> >> >> > > >> > far on XP SP1, I'm able to stop WZC before my app (by
> simply
>> >> >> > executing
>> >> >> > > >> > "net
>> >> >> > > >> > stop wzcsvc"). It stops successfully and I'm able to get
>> > handle
>> >> > to
>> >> >> > the
>> >> >> > > >> > WLAN
>> >> >> > > >> > adapter and I could send different commands to set WEP
>> >> >> > > >> > key,
>> >> >> connect,
>> >> >> > > > etc.,
>> >> >> > > >> >
>> >> >> > > >> > OK, now when I do the same in SP2 machine, though the WZC
>> >> >> > > >> > service
>> >> >> > > > appears
>> >> >> > > >> > have stopped, I can't get IOCTL_NDISUIO_OPEN_DEVICE to
>> >> >> > > >> > work
>> > with
>> >> >> > > >> > DeviceIOControl. I get some error that says something like
> it
>> > is
>> >> > in
>> >> >> > use
>> >> >> > > >> > already. And I read in newgroups that from SP2, microsoft
>> >> >> > > >> > stopped
>> >> >> > > > allowing
>> >> >> > > >> > people from stopping the service. And also came to know
> that
>> > it
>> >> > is
>> >> >> > > >> > possible
>> >> >> > > >> > to stop it using WZCQueryInterface and WZCSetInterface.
>> >> >> > > >> > Though
>> > I
>> >> >> have
>> >> >> > > > the
>> >> >> > > >> > prototypes of these two functions, I'm unable to get the
>> >> > definition
>> >> >> > of
>> >> >> > > >> > INTF_ENTRY. I searched google for "wzcsapi.h" (where i
>> >> >> > > >> > hope
>> >> >> > > >> > to
>> >> > find
>> >> >> > the
>> >> >> > > >> > definition of INTF_ENTRY) without any luck. I don;t have
>> >> >> > > >> > WinCE
>> >> >> > > >> > installed
>> >> >> > > >> > on
>> >> >> > > >> > my machine. Can someone send me "wzcsapi.h" please? If
>> >> >> > > >> > not,
>> >> > atleast
>> >> >> > > >> > definition of INTF_ENTRY.
>> >> >> > > >> >
>> >> >> > > >> > Any suggestions, pointers, source-code samples will be of
>> > great
>> >> >> help.
>> >> >> > > >> >
>> >> >> > > >> > Thanks,
>> >> >> > > >> >
>> >> >> > > >> > John.
>> >> >> > > >> >
>> >> >> > > >> >
>> >> >> > > >> >
>> >> >> > > >>
>> >> >> > > >>
>> >> >> > > >
>> >> >> > > >
>> >> >> > >
>> >> >> > >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>


.



Relevant Pages

  • Re: How to stop WZC Service in XP-SP2
    ... Thanks agian. ... CString szDesc = ie.wszDescr; ... Is this how I should be doing with WZCSetInterface? ... >>> Arkady ...
    (microsoft.public.win32.programmer.networks)
  • Re: WZCSetInterface & XP SP2
    ... And sure structures differ in XP SP2 from CE as you mentioned before ... before I can call the WZCSetInterface function ... > Arkady Frenkel wrote: ... I am aware of the fact that the WZC API has changed in XP ...
    (microsoft.public.win32.programmer.networks)
  • Re: How to stop WZC Service in XP-SP2
    ... Arkady ... > this stuff for disabling a particular NIC). ... > disable NIC using WZCSetInterface or something else? ... >> What you disable with the code is not NDISUIO but NIC adapter (so you ...
    (microsoft.public.win32.programmer.networks)