DeviceLock

Hi,
AnyOne can tell me how to block webcam or bluetooth device in windows by
programming or by device driver programming.
Thanks
Gautam

Hi,
I want block webcam and bluetooth in windows system by programming, any hint
? is it possible from Usb filter driver (sample in WinDDK) to block usb
interface?

Thanks,
Gautam

Gautam" wrote in message
news:xxxxx@ntdev…
> Hi,
> I want block webcam and bluetooth in windows system by programming, any
> hint ? is it possible from Usb filter driver (sample in WinDDK) to block
> usb interface?

Device manager -> Disable or remove device
( see the devcon sampe for doing your own programming).

–PA

Hi All,
I know the method of device manager blocking or from devcon but here system
want reboot, I want another method where reboot is not require. Can any live
blocking methoh of webcam or bluetooth by programming. Can it possible from
kernel mode driver.
Thanks
Gautam
----- Original Message -----
From: “Pavel A.”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Friday, November 21, 2008 7:28 PM
Subject: Re:[ntdev] DeviceLock

> Gautam" wrote in message
> news:xxxxx@ntdev…
>> Hi,
>> I want block webcam and bluetooth in windows system by programming, any
>> hint ? is it possible from Usb filter driver (sample in WinDDK) to block
>> usb interface?
>
> Device manager -> Disable or remove device
> ( see the devcon sampe for doing your own programming).
>
> --PA
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Gautam wrote:

I know the method of device manager blocking or from devcon but here
system want reboot,

No, it doesn’t.

I want another method where reboot is not require. Can any live
blocking methoh of webcam or bluetooth by programming. Can it possible
from kernel mode driver.

Well, if you aren’t going to believe us, why should we waste time
offering you advice?

I already responded to this on the driver development newsgroup. The
answer isn’t any different. The most effective way to block USB access
is to get a tube of silicone sealant and plug all of the USB ports.
It’s very difficult to block web cams generically, because they aren’t
consistent. Some go in Image class, some go in Media class, and some
use a custom driver that cannot be identified at all.

What is the point of all of this? What the use case? If you can’t
trust your users, then you shouldn’t be giving them computers. Or,
order computers without Bluetooth adapters. Or, open the cases and cut
the wires.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hi All,
I am giving all ditail…
I tested the blocking method of device by devcon, it will work fine with
MicroSoft Bluetooth Stack, but After installing third porty software
(BlueSoleil Software) then system want reboot by appling devcon disable
method . after installing BlueSoleil software in windows then system want to
reboot by devcon method. Realy it is very serious problem with me I am not
able to avoid rebooting problem after installing Third Porty Software for
blocking a device using devcon In my system, BlueSoleil Software is install
and i am using SMC USB bluetooth dongle .
***********************
Using Devcon…
C:\devcon disable USB* (Enter)
USB\VID_XXXXXXXXXXXXXXXXXX : Disabled on Reboot (out put)
I will get disable effect after reboot the system.
************************
It is same case with Logitech USB webcam.
Any one can give ANS then (very-very thanks for that)
is it any proble in this code?..
but it want reboot with BlueSoleil.

long DisableDevice(HDEVINFO *phDevInfo, PSP_DEVINFO_DATA pDevInfoData, long
lDisable, BOOL *bRebootRequired)

{

long lRetVal = ERROR_SUCCESS;

SP_PROPCHANGE_PARAMS PropChangeParams;

SP_DEVINSTALL_PARAMS DevInstallParams;

switch (lDisable)

{

case DICS_START: //DICS_ENABLE

PropChangeParams.ClassInstallHeader.cbSize = sizeof(SP_CLASSINSTALL_HEADER);

PropChangeParams.ClassInstallHeader.InstallFunction = DIF_PROPERTYCHANGE;

PropChangeParams.StateChange = DICS_START;

PropChangeParams.Scope = DICS_FLAG_CONFIGSPECIFIC;

PropChangeParams.HwProfile = 0;

break;

case DICS_STOP: //DICS_DISABLE

PropChangeParams.ClassInstallHeader.cbSize = sizeof(SP_CLASSINSTALL_HEADER);

PropChangeParams.ClassInstallHeader.InstallFunction = DIF_PROPERTYCHANGE;

PropChangeParams.StateChange = DICS_STOP;

PropChangeParams.Scope = DICS_FLAG_CONFIGSPECIFIC;

PropChangeParams.HwProfile = 0;

break;

};

if(!SetupDiSetClassInstallParams(*phDevInfo, pDevInfoData,
&PropChangeParams.ClassInstallHeader, sizeof(PropChangeParams))

|| !SetupDiCallClassInstaller(DIF_PROPERTYCHANGE, *phDevInfo, pDevInfoData))

{

//lRetVal = GetLastError();

}

else

{

DevInstallParams.cbSize = sizeof(DevInstallParams);

if(SetupDiGetDeviceInstallParams(*phDevInfo, pDevInfoData,
&DevInstallParams))

{

if (DevInstallParams.Flags & (DI_NEEDRESTART|DI_NEEDREBOOT))

*bRebootRequired=TRUE;

}

}

lRetVal = GetLastError();

return lRetVal;

}

Thanks,
Gautam
----- Original Message -----
From: “Tim Roberts”
To: “Windows System Software Devs Interest List”
Sent: Friday, November 21, 2008 10:49 PM
Subject: Re: [ntdev] DeviceLock

> Gautam wrote:
>>
>> I know the method of device manager blocking or from devcon but here
>> system want reboot,
>
> No, it doesn’t.
>
>> I want another method where reboot is not require. Can any live
>> blocking methoh of webcam or bluetooth by programming. Can it possible
>> from kernel mode driver.
>
> Well, if you aren’t going to believe us, why should we waste time
> offering you advice?
>
> I already responded to this on the driver development newsgroup. The
> answer isn’t any different. The most effective way to block USB access
> is to get a tube of silicone sealant and plug all of the USB ports.
> It’s very difficult to block web cams generically, because they aren’t
> consistent. Some go in Image class, some go in Media class, and some
> use a custom driver that cannot be identified at all.
>
> What is the point of all of this? What the use case? If you can’t
> trust your users, then you shouldn’t be giving them computers. Or,
> order computers without Bluetooth adapters. Or, open the cases and cut
> the wires.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Hi All,
I am giving all ditail…
I tested the blocking method of device by devcon, it will work fine with
MicroSoft Bluetooth Stack, but After installing third porty software
(BlueSoleil Software) then system want reboot by appling devcon disable
method . after installing BlueSoleil software in windows then system want to
reboot by devcon method. Realy it is very serious problem with me I am not
able to avoid rebooting problem after installing Third Porty Software for
blocking a device using devcon In my system, BlueSoleil Software is install
and i am using SMC USB bluetooth dongle .
***********************
Using Devcon…
C:\devcon disable USB* (Enter)
USB\VID_XXXXXXXXXXXXXXXXXX : Disabled on Reboot (out put)
I will get disable effect after reboot the system.
************************
It is same case with Logitech USB webcam.
Any one can give ANS then (very-very thanks for that)
is it any proble in this code?..
but it want reboot with BlueSoleil.

long DisableDevice(HDEVINFO *phDevInfo, PSP_DEVINFO_DATA pDevInfoData, long
lDisable, BOOL *bRebootRequired)

{

long lRetVal = ERROR_SUCCESS;

SP_PROPCHANGE_PARAMS PropChangeParams;

SP_DEVINSTALL_PARAMS DevInstallParams;

switch (lDisable)

{

case DICS_START: //DICS_ENABLE

PropChangeParams.ClassInstallHeader.cbSize = sizeof(SP_CLASSINSTALL_HEADER);

PropChangeParams.ClassInstallHeader.InstallFunction = DIF_PROPERTYCHANGE;

PropChangeParams.StateChange = DICS_START;

PropChangeParams.Scope = DICS_FLAG_CONFIGSPECIFIC;

PropChangeParams.HwProfile = 0;

break;

case DICS_STOP: //DICS_DISABLE

PropChangeParams.ClassInstallHeader.cbSize = sizeof(SP_CLASSINSTALL_HEADER);

PropChangeParams.ClassInstallHeader.InstallFunction = DIF_PROPERTYCHANGE;

PropChangeParams.StateChange = DICS_STOP;

PropChangeParams.Scope = DICS_FLAG_CONFIGSPECIFIC;

PropChangeParams.HwProfile = 0;

break;

};

if(!SetupDiSetClassInstallParams(*phDevInfo, pDevInfoData,
&PropChangeParams.ClassInstallHeader, sizeof(PropChangeParams))

|| !SetupDiCallClassInstaller(DIF_PROPERTYCHANGE, *phDevInfo, pDevInfoData))

{

//lRetVal = GetLastError();

}

else

{

DevInstallParams.cbSize = sizeof(DevInstallParams);

if(SetupDiGetDeviceInstallParams(*phDevInfo, pDevInfoData,
&DevInstallParams))

{

if (DevInstallParams.Flags & (DI_NEEDRESTART|DI_NEEDREBOOT))

*bRebootRequired=TRUE;

}

}

lRetVal = GetLastError();

return lRetVal;

}

Thanks,
Gautam

“Gautam” wrote in message
news:xxxxx@ntdev…
> Hi All,
> I am giving all ditail…
> I tested the blocking method of device by devcon, it will work fine with
> MicroSoft Bluetooth Stack, but After installing third porty software
> (BlueSoleil Software) then system want reboot by appling devcon disable
> method . after installing BlueSoleil software in windows then system want
> to reboot by devcon method. Realy it is very serious problem with me I am
> not able to avoid rebooting problem after installing Third Porty Software
> for blocking a device using devcon In my system, BlueSoleil Software is
> install and i am using SMC USB bluetooth dongle .
>
> Using Devcon…
> C:\devcon disable USB* (Enter)
> USB\VID_XXXXXXXXXXXXXXXXXX : Disabled on Reboot (out put)
> I will get disable effect after reboot the system.
>
*
> It is same case with Logitech USB webcam.
> Any one can give ANS then (very-very thanks for that)
> is it any proble in this code?..
> but it want reboot with BlueSoleil.
>
> long DisableDevice(HDEVINFO *phDevInfo, PSP_DEVINFO_DATA pDevInfoData,
> long lDisable, BOOL *bRebootRequired)
>
> {
>
> long lRetVal = ERROR_SUCCESS;
>
> SP_PROPCHANGE_PARAMS PropChangeParams;
>
> SP_DEVINSTALL_PARAMS DevInstallParams;
>
>
> switch (lDisable)
>
> {
>
> case DICS_START: //DICS_ENABLE
>
> PropChangeParams.ClassInstallHeader.cbSize =
> sizeof(SP_CLASSINSTALL_HEADER);
>
> PropChangeParams.ClassInstallHeader.InstallFunction = DIF_PROPERTYCHANGE;
>
> PropChangeParams.StateChange = DICS_START;
>
> PropChangeParams.Scope = DICS_FLAG_CONFIGSPECIFIC;
>
> PropChangeParams.HwProfile = 0;
>
> break;
>
> case DICS_STOP: //DICS_DISABLE
>
> PropChangeParams.ClassInstallHeader.cbSize =
> sizeof(SP_CLASSINSTALL_HEADER);
>
> PropChangeParams.ClassInstallHeader.InstallFunction = DIF_PROPERTYCHANGE;
>
> PropChangeParams.StateChange = DICS_STOP;
>
> PropChangeParams.Scope = DICS_FLAG_CONFIGSPECIFIC;
>
> PropChangeParams.HwProfile = 0;
>
> break;
>
> };
>
>
> if(!SetupDiSetClassInstallParams(*phDevInfo, pDevInfoData,
> &PropChangeParams.ClassInstallHeader, sizeof(PropChangeParams))
>
> || !SetupDiCallClassInstaller(DIF_PROPERTYCHANGE, *phDevInfo,
> pDevInfoData))
>
> {
>
> //lRetVal = GetLastError();
>
> }
>
> else
>
> {
>
> DevInstallParams.cbSize = sizeof(DevInstallParams);
>
>
> if(SetupDiGetDeviceInstallParams(*phDevInfo, pDevInfoData,
> &DevInstallParams))
>
> {
>
> if (DevInstallParams.Flags & (DI_NEEDRESTART|DI_NEEDREBOOT))
>
> *bRebootRequired=TRUE;
>
> }
>
> }
>
> lRetVal = GetLastError();
>
> return lRetVal;
>
> }
>
> Thanks,
> Gautam
> ----- Original Message -----
> From: “Tim Roberts”
> To: “Windows System Software Devs Interest List”
> Sent: Friday, November 21, 2008 10:49 PM
> Subject: Re: [ntdev] DeviceLock
>
>
>> Gautam wrote:
>>>
>>> I know the method of device manager blocking or from devcon but here
>>> system want reboot,
>>
>> No, it doesn’t.
>>
>>> I want another method where reboot is not require. Can any live
>>> blocking methoh of webcam or bluetooth by programming. Can it possible
>>> from kernel mode driver.
>>
>> Well, if you aren’t going to believe us, why should we waste time
>> offering you advice?
>>
>> I already responded to this on the driver development newsgroup. The
>> answer isn’t any different. The most effective way to block USB access
>> is to get a tube of silicone sealant and plug all of the USB ports.
>> It’s very difficult to block web cams generically, because they aren’t
>> consistent. Some go in Image class, some go in Media class, and some
>> use a custom driver that cannot be identified at all.
>>
>> What is the point of all of this? What the use case? If you can’t
>> trust your users, then you shouldn’t be giving them computers. Or,
>> order computers without Bluetooth adapters. Or, open the cases and cut
>> the wires.
>>
>> –
>> Tim Roberts, xxxxx@probo.com
>> Providenza & Boekelheide, Inc.
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
>

Gautam wrote:

Hi All,
I am giving all ditail…
I tested the blocking method of device by devcon, it will work fine
with MicroSoft Bluetooth Stack, but After installing third porty
software (BlueSoleil Software) then system want reboot by appling
devcon disable method . after installing BlueSoleil software in
windows then system want to reboot by devcon method. Realy it is very
serious problem with me I am not able to avoid rebooting problem
after installing Third Porty Software for blocking a device using
devcon In my system, BlueSoleil Software is install and i am using SMC
USB bluetooth dongle .
***********************
Using Devcon…
C:\devcon disable USB* (Enter)
USB\VID_XXXXXXXXXXXXXXXXXX : Disabled on Reboot (out put)
I will get disable effect after reboot the system.
************************
It is same case with Logitech USB webcam.
Any one can give ANS then (very-very thanks for that)
is it any proble in this code?..
but it want reboot with BlueSoleil

In that case, why aren’t you complaining to BlueSoleil? They have
installed some kind of class filter or co-installer that is rejecting
the attempt to disable a device without a reboot. There is nothing you
can do – BlueSoleil needs to fix their software.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hi All,
AnyBody Know how to block bluetooth or webcam in windows oparating system by
programming.(except devcon).
1-Is it possible to block bluetooth or webcam by USB filter driver using
Device Class (Class_0e).
2-Is it possible to block bluetooth or webcam by using kernel mode driver.
3-Any method by programming (except device manager method)

Thanks,
Gautam