beautypg.com

Ocean Optics NeoFox Engineering Note User Manual

Page 9

background image

NeoFox Communication Interfaces

013-20000-010-04-201211 9

Return Value

This function always returns a value of 1.

Remarks

This function should be called at the beginning of any user program, before any other DLL functions are called.


int DevicePerformDiscovery(int vendorID, int productID, int ShowGUI)

Description

This function instructs the DLL to create an indexed list of all NeoFox devices that are connected to the system
via USB but have not been opened already.

Parameters

int

vendorID

Vendor ID for the NeoFox product. The value is 0x2457.

int

productID

Product ID for the NeoFox product. The value is 0x3000.

int

ShowGUI

This parameter is reserved. Pass it a value of 0.


Return Value

This function returns the number of NeoFox devices that have been connected to the system via USB, but have
not yet been opened with the DeviceOpenChannel function.


Remarks

This function must be called before a call to DeviceOpenChannel. It creates internally an indexed list of
unopened NeoFox devices. The DeviceOpenChannel function will accept one of the indices from that list as a
parameter to determine which device will be opened. It is important to note that once the DeviceOpenChannel
function has been called to open a connection to any of the NeoFoxes in the list, the remaining indices remain
valid until the next call to DevicePerformDiscovery. When DevicePerformDiscovery is called after
DeviceOpenChannel has been called, it will re-index its list without including the newly opened NeoFox.
Subsequent calls to DeviceOpenChannel will need to use the new indices as appropriate.


int DeviceOpenChannel(int Select, int SubChannel, int ShowGUI)

Description

Opens a NeoFox device and returns a handle to that device.


Parameters

int

Select

Index of the unopened NeoFox which is to be opened. See remarks
for more information about this parameter.

int

SubChannel

This parameter is reserved. Pass it a value of 0.

int

ShowGUI

This parameter is reserved. Pass it a value of 0.


Return Value

Returns an integer handle to the NeoFox device that has been opened by the function. A value of 0 or -1
indicates that the function has failed to open the NeoFox device properly. Handle values begin at 10000 and
increment upwards as new NeoFox devices are opened.