Retrieve the device ID, then the device can be accessed.
Ret = ZmInit ( DeviceName , Id )
DeviceName
[ VB.NET: String ] [ C, C++: char * ] [ C#: string ]
Specify the device name set in Device Manager.
Id
[ VB.NET: Short ] [ C, C++: short * ] [ C#: out short ]
A device ID is returned. By using this device ID, you can access the device in the following functions.
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ]
Definition |
Value |
Description |
ZM_ERR_SUCCESS |
0 |
Normality completion |
ZM_ERR_INI_MEMORY |
3 |
Failed in the allocation of the memory. |
ZM_ERR_INI_REGISTRY |
4 |
Failed in the access of registry. |
ZM_ERR_INI_NOT_FOUND_SYS_FILE |
8 |
Initialization failed because czm.sys is not found. |
ZM_ERR_INI_DLL_FILE_VERSION |
9 |
Initialization failed because the file version of czm.dll cannot be acquired. |
ZM_ERR_INI_SYS_FILE_VERSION |
10 |
Initialization failed because the file version of czm.sys cannot be acquired. |
ZM_ERR_INI_NO_MATCH_DRV_VERSION |
11 |
Initialization failed because the file version of czm.dll is not same as czm.sys. |
ZM_ERR_DLL_DEVICE_NAME |
10000 |
The devicename which wasn't registered by a device manager was specified. |
ZM_ERR_DLL_CALL_DRIVER |
10002 |
Driver can't be called (Failed in the device I/O control). |
ZM_ERR_DLL_CREATE_FILE |
10003 |
Failed in the creation of the file (Failed in CreateFile). |
ZM_ERR_INFO_INVALID_DEVICE |
10050 |
Specified device name is not found. Please check spelling. |
ZM_ERR_INFO_NOT_FIND_DEVICE |
10051 |
No more device. |
The others (See also: Details of Error Code)
None
Retrieve the device ID, then the device can be accessed.
By using this device ID, you can access the device in the following functions.
When accessing more than one device, please prepare corresponding variables to store the IDs.
After ZmInit completed normally, and before ZmExit is called, every function can be used.
Up to 16 processes can access one device.
Initialize the device "ZM000" and retrieve the Id.
VB.NET |
Dim Ret As Integer |
C, C++ |
long Ret; |
C# |
int Ret; |