hi..
I have tried to use ur code given in this post,but der are sum error as sum variables not defined or void Device not found...
Plz hepl me in this matter..
Thanks..
:)
Devang wrote:
Re: Want help regarding : "disable bluetooth device"
11-Apr-08
On Apr 8, 7:29 pm, "Ben Voigt [C++ MVP]" <***@nospam.nospam> wrote
Actually when I use API "SetupDiRemoveDevice", it removes device fro
device manage
But device is still usable, and can be used from "Bluesoleil" GUI
and following sequence of APIs you suggeste
-SetupDiSetClassInstallParams
-SetupDiCallClassInstalle
Returns no error but doesn't make any effect
Thanks
Previous Posts In This Thread:
On Monday, March 31, 2008 6:33 PM
Ben Voigt [C++ MVP] wrote:
Re: Want help regarding : "disable bluetooth device"
Devang wrote
Yes, using SetupDi* functions.
On Thursday, April 03, 2008 2:10 AM
Devang wrote:
Want help regarding : "disable bluetooth device"
H
I want to disable bluetooth device connected to my PC
Can I disble bluetooth radio connected to my PC through code (C++)
Thanking yo
Regard
Devang Vyas
On Thursday, April 03, 2008 2:10 AM
Devang wrote:
Re: Want help regarding : "disable bluetooth device"
Thank you very much for your valuable help
On Monday, April 07, 2008 9:37 AM
Ben Voigt [C++ MVP] wrote:
Re: Want help regarding : "disable bluetooth device"
Devang wrote
If you remove the driver, the device will be left unattached, and Windows
will install the best driver for it at the next opportunity
If you want to disable, as you first said, try something along these lines
(this is C++/CLI code, but the steps should be readily apparent, mostly you
want to replace the error handling)
void Device::Disable( void
SP_PROPCHANGE_PARAMS params
params.ClassInstallHeader.cbSize = sizeof (SP_CLASSINSTALL_HEADER)
params.ClassInstallHeader.InstallFunction = DIF_PROPERTYCHANGE
params.Scope = DICS_FLAG_GLOBAL
params.HwProfile = 0
params.StateChange = DICS_DISABLE
if (!SetupDiSetClassInstallParamsW((HDEVINFO)deviceSet,
(PSP_DEVINFO_DATA)deviceData, ¶ms.ClassInstallHeader, sizeof params)
throw gcnew WinapiException()
if (!SetupDiCallClassInstaller(DIF_PROPERTYCHANGE, (HDEVINFO)deviceSet,
(PSP_DEVINFO_DATA)deviceData)
throw gcnew WinapiException()
}
On Tuesday, April 08, 2008 10:29 AM
Ben Voigt [C++ MVP] wrote:
Re: Want help regarding : "disable bluetooth device"
Devang wrote
Are any of the API calls failing? What does GetLastError() return?
On Tuesday, April 08, 2008 10:03 PM
Devang wrote:
Re: Want help regarding : "disable bluetooth device"
On Apr 1, 3:33 am, "Ben Voigt [C++ MVP]" <***@nospam.nospam> wrote
Hello
In Win2000 when I call "SetupDiRemoveDevice" it removes bluetoot
device from "Device Manager"
But it still works fine ( I have installed third party bluetoot
driver for Win2000)
And GUID_DEVCLASS_BLUETOOTH in "SetupDiGetClassDevs" doesn't works i
win2000
So how can I find out installed bluetooth device in PC
Thanx
On Tuesday, April 08, 2008 10:04 PM
Devang wrote:
Re: Want help regarding : "disable bluetooth device"
On Apr 7, 6:37 pm, "Ben Voigt [C++ MVP]" <***@nospam.nospam> wrote
Ya Thank
Your code sample was very helpful
It too works fine for WinXP SP2
But I am facing problem with "Windows 2000"
I have installed "BlueSoleil" driver on Windows 2000
I am able to find out arrival of bluetooth device(In win2k usin
device class desc)
But unable to disble it. The same code work fine for WinXP.
On Wednesday, April 09, 2008 10:08 AM
Ben Voigt [C++ MVP] wrote:
Re: Want help regarding : "disable bluetooth device"
Devang wrote
Is this different from what happens if you uninstall from device manager
That should have disabled the device, so that device manager would show
red X over the icon.
On Friday, April 11, 2008 4:25 AM
Devang wrote:
Re: Want help regarding : "disable bluetooth device"
On Apr 8, 7:29 pm, "Ben Voigt [C++ MVP]" <***@nospam.nospam> wrote
Actually when I use API "SetupDiRemoveDevice", it removes device fro
device manager
But device is still usable, and can be used from "Bluesoleil" GUI.
and following sequence of APIs you suggested
-SetupDiSetClassInstallParamsW
-SetupDiCallClassInstaller
Returns no error but doesn't make any effect.
Thanks
Submitted via EggHeadCafe - Software Developer Portal of Choice
AJAX Web Service Driven Customers Table With Customer Details
http://www.eggheadcafe.com/tutorials/aspnet/4c3d2726-d99e-4f83-9e49-0d4867b6271a/ajax-web-service-driven-customers-table-with-customer-details.aspx