Restrict device to one session

Hi,

I’m loading a function driver for a device ( virtual ) on Windows Server 2003.
I’m using the toaster sample of DDK. So I’m having the virtual toaster bus driver
installed at the server. I open a session to the server on a client, and then install the
function driver for the toaster device.

What I want is that the newly enumerated device should not be visible to other sessions.

Can this be done at the bus level, while creating the PDOs.

Thanks

The PDO will be visible to all sessions. You must then check the current session in the IRP_MJ_CREATE/EvtDeviceFileCreate of the FDO loaded on that PDO to see if the current session is the one allowed (how the FDO knows this is up to you, the PDO could tell the PDO what session created it for instance)

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, November 17, 2010 10:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Restrict device to one session

Hi,

I’m loading a function driver for a device ( virtual ) on Windows Server 2003.
I’m using the toaster sample of DDK. So I’m having the virtual toaster bus driver installed at the server. I open a session to the server on a client, and then install the function driver for the toaster device.

What I want is that the newly enumerated device should not be visible to other sessions.

Can this be done at the bus level, while creating the PDOs.

Thanks


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

Thanks for the reply Doron.

The problem here is, going forward I will have no control on the function drivers.
What I own is the bus driver. Hence I can only tweak at the bus level.

Thanks

You could map the symbolic link of the device to the current session only. Other sessions won’t see the symbolic link. The device will still be visible in the DeviceManager, though, but you can hide it for all sessions.

The bus driver is not the one creating the symbolic links, so he can’t control which session they are mapped into. Also, for device interfaces, which are also sym links, the io manager creates the link, not any driver in the stack. Basically, you can’t solve this problem at the bus driver level of abstraction.

d

dent from a phpne with no keynoard

-----Original Message-----
From: xxxxx@broadcom.com
Sent: November 18, 2010 6:43 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Restrict device to one session

You could map the symbolic link of the device to the current session only. Other sessions won’t see the symbolic link. The device will still be visible in the DeviceManager, though, but you can hide it for all sessions.


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,

The RemoteFx technology of Microsoft happens to do the same. Are they doing something in the IO manager or some other part of the OS, which can’t be done at bus level.

Thanks