Client Properties
Windows Portable Devices supports the following client properties.
Property | VarType | Description |
---|---|---|
WPD_CLIENT_DESIRED_ACCESS | VT_UI4 | A value that specifies that the client requires unique access permissions, such as GENERIC_READ only. If this property is not set, WPD assumes GENERIC_READ | GENERIC_WRITE, which is the recommended default. |
WPD_CLIENT_MAJOR_VERSION | VT_UI4 | A number that specifies the major version of the client. |
WPD_CLIENT_MINOR_VERSION | VT_UI4 | A number that specifies the minor version of the client. |
WPD_CLIENT_NAME | VT_LPWSTR | A name string for the client application. |
WPD_CLIENT_REVISION | VT_UI4 | A number that specifies the revision (or build number) of the client. |
WPD_CLIENT_SECURITY_QUALITY_OF_SERVICE | VT_UI4 | A value that specifies the security quality of service for the connection to the driver. This relates to the Security Quality of Service flags for CreateFile. For example, these flags allow or disallow a driver to impersonate the client. SECURITY_IDENTIFICATION is assumed if this value is not provided. Typically, applications should set this value to SECURITY_IMPERSONATION, since some drivers will require impersonation in order to function. However, applications running under strict security requirements with a known subset of devices may want to restrict the driver's ability to identify or impersonate the caller. Note that reducing the impersonation level to anything lower than SECURITY_IMPERSONATION may result in some drivers having reduced functionality. |
WPD_CLIENT_SHARE_MODE | VT_UI4 | A value that specifies the share mode the client is requesting from the driver. The possible values are the same as for CreateFile, for example, FILE_SHARE_READ, FILE_SHARE_WRITE, and so on. FILE_SHARE_READ | FILE_SHARE_WRITE is assumed if the client does not specify this parameter. This is the recommended default. However, where a different share mode is required, for example, FILE_SHARE_READ to request read sharing only, this parameter is required. |
WPD_CLIENT_WMDRM_APPLICATION_PRIVATE_KEY | VT_VECTOR_|VT_UI1 | A value that specifies the Windows Media DRM application private key of the client. |
WPD_CLIENT_WMDRM_APPLICATION_CERTIFICATE | VT_VECTOR_|VT_UI1 | A value that specifies the Windows Media DRM certificate of the client. |
WPD_CLIENT_EVENT_COOKIE | VT_LPWSTR | A Client supplied cookie returned by the driver in events posted as a direct result of operations issued by this client. This is an optional property which the driver may supply as an event parameter. Clients typically use this value to optimize their event handling. For example if the client deletes an object, its event handler may choose to ignore the resulting event knowing that it already took the appropriate action (e.g. updated the view in the thread that issued the delete). |
WPD_CLIENT_MINIMUM_RESULTS_BUFFER_SIZE | VT_UI4 | Specifies the minimum buffer size (in bytes) for sending commands to the driver. Clients can use this option to recommend the minimum size of the internal buffer that is used for sending commands to the driver. This can result in a smaller memory footprint for clients that only send commands with small data sizes, such as getting or setting properties. The driver can override this buffer size by setting PortableDeviceResultsBufferMin in its Device Parameters section. This buffer size must be 1024 or above. If neither the client nor the driver sets the buffer size, it defaults to 1 MB. |
WPD_CLIENT_MANUAL_CLOSE_ON_DISCONNECT | VT_BOOL | An advanced option for clients that manually call IPortableDevice::Close or IPortableDeviceService::Close for each disconnected object, instead of relying on the API to do this. FALSE is assumed if the client does not specify this parameter. This is the recommended default if the client is not listening for WM_DEVICECHANGE messages. Clients that specify this option typically listen for WM_DEVICECHANGE messages for the device and then manually close the IPortableDevice and IPortableDeviceService instances on device disconnect. Clients that choose this option must carefully manage the lifetime of each IPortableDevice and IPortableDeviceService instance by releasing these objects when the device is disconnected. Failure to do so will result in leaks in the WUDFHost.exe processes for the driver. |
Requirements
Requirement | Value |
---|---|
Header |
|
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for