Your browser does not allow scripts
Please click here to view a static table of contents without scripts
DS1M12_OpenDevice
Return to Introduction  Previous page  Next page
This function opens a DS1M12.

DS_STATUS
DS1M12_OpenDevice
(DS_HANDLE *pdsHandle)




Parameters
pdsHandle
Pointer to a variable of type DS_HANDLE where the handle to the open device will be returned. This handle must then be used in all subsequent calls to access this device.




Return Value
Returns DDL_SUCCESS if successful, otherwise the return value will be one of the following error codes:

   DDL_DEVICE_NOT_FOUND
   DDL_DEVICE_IN_USE
   DDL_DEVICE_IN_USE_DEVICE_NOT_FOUND
   DDL_TOO_MANY_DEVICES
   DDL_FAILED_TO_SYNCHRONIZE_DEVICE
   DDL_
FAILED_TO_COMPLETE_COMMAND
   DDL_IO_ERROR
   DDL_INSUFFICIENT_RESOURCES


Remarks
This function first determines which attached application is invoking this function. If an attached application invokes this function again and it's assigned handle is still open then it's assigned handle will be returned again. If another application attempts to open this device, which is already in use, an error code is returned.

This function first then determines if a DS1M12 is present then checks that an application is not already using this DS1M12. If another application is not using this DS1M12 then an attempt is made to open it. If the open was not successful an error code will be returned. If the open is successful, the DS1M12 is initialized to its default state. If the initialization was successful the handle is passed back to the application. If the initialization was not successful an error code will be returned.