beautypg.com

Chapter 2, Programming information, Monoscan-2000 interface-dll – Ocean Optics MonoScan2000 User Manual

Page 13

background image

000-10000-150-02-201011

5

Chapter 2

Programming Information

MonoScan-2000 Interface-DLL

The following functions are exported by MonoScandrv.dll:

MONO_OpenConnection

long __stdcall MONO_OpenConnection(char* PortName);

Returns the handle value for the specified Comport as long integer.
This value has to be stored locally for all other functions.
Returns a negative value in case of error.
Portname has to be e.g. “Com1”, “Com2”

MONO_CloseConnection

short __stdcall MONO_CloseConnection(long Handle);

Close the connection opened before.
Returns 1 on success else -1
long Handle: Handle of the comport returned by MONO_OpenConnection

MONO_GetDeviceData

short __stdcall MONO_GetDeviceData(long Handle, unsigned short Node, long* CalibrationData, char*
SerialNo);

Get the calibration data and the serialnumber of the device
long Handle: The handle to the comport returned by MONO_OpenConnection
unsigned short Node: has to be 0 (zero)
long* CalibrationData: Array of long integers, has to contain 92 elements
char* SerialNo: The serialnumber of the Device, at least 10 characters