DRV_DeviceSetProperty

INT32S DRV_DeviceSetProperty(
   PTR_T DeviceHandle,
   INT16U nPropertyID,
   void * pBuffer,
   INT32U Length );

Purpose

On the DeviceHandle specified device, it sets the device's properties  by its pre-defined property ID.

Parameters   

By specifying the property ID (nPropertyID) and defining the corresponding buffer (pBuffer) of property and the buffer length (pLength), the user can set the corresponding properties.

The property ID contains pre-defined constants that indicate properties. Therefore, the user can acquire the corresponding device properties. Please refer to the following Notes for details.

The pBuffer points to a buffer that stores property information. The user sets the buffer size by using the Length. If the user does not know the accurate buffer size, please refer to the specified device user manual.

Name Direction Range Description
DeviceHandle input default The pointer retrieved from the DRV_DeviceOpen which specifies the target device.
nPropertyID input default The pre-defined device property ID. Please refer to the Notes for details.
pBuffer input default The pointer that specifies the device property buffer. It should be allocated by the user. If the user does not know the accurate buffer size, the DRV_DeviceGetProperty must be called to acquire the specified property buffer size from a parameter (ULONG * pLength) of that function. 
Length input default The user-allocated buffer size. If the user does not know the accurate buffer size, please reference the special device user manual.

Return

   1. 0 Successful.
   2. other value Please reference ErrorCodes

Notes

1. The user can find the definition of device property ID in advproperty.h. The buffer size differs for different property information. Please refer to individual device driver manuals.