Export (0) Print
Expand All

DEVPKEY_Device_SessionId

The DEVPKEY_Device_SessionId device property represents a value that indicates the Terminal Services sessions that a device instance can be accessed in.

Property key

DEVPKEY_Device_SessionId

Property-data-type identifier

DEVPROP_TYPE_INT32

Property access

Read and write access by applications and services.

Localized?

No

 

Remarks

The Terminal Server feature supports Plug and Play (PnP) device redirection. Device redirection determines whether a device can be accessed by applications and services within all Terminal Services sessions or whether a device can be accessed only within a particular Terminal Services session. The accessibility of a device within a Terminal Services session is determined by the setting of DEVPKEY_Device_SessionId for a device, as follows:

  • If the DEVPKEY_Device_SessionId property does not exist, or the property exists, but the value of the property is not set, the device can be accessed in all active Terminal Services sessions.

  • If the DEVPKEY_Device_SessionId property exists and the value of the property is set to a nonzero Terminal Services l session identifier, the device can be accessed only in the Terminal Services session indicated by the Terminal Services session identifier.

  • If the DEVPKEY_Device_SessionId property exists and the value of the property is set to zero, the device can be accessed only by services. Session zero is a special session in which only services can run.

You can access the DEVPKEY_Device_SessionId property by calling SetupDiGetDeviceProperty and SetupDiSetDeviceProperty.

Windows Server 2003, Windows XP, and Windows 2000 do not support this property.

Requirements

Version

Available in Windows Vista and later versions of Windows.

Header

Devpkey.h (include Devpkey.h)

See also

SetupDiGetDeviceProperty
SetupDiSetDeviceProperty

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft