Ocean Optics NeoFox Engineering Note User Manual
Page 10
 
NeoFox Communication Interfaces
10 013-20000-010-04-201211
 
Remarks 
This function should be called immediately after the DevicePerformDiscovery function has been called. The 
DevicePerformDiscovery function will create an indexed list of all NeoFoxes that are connected to the computer 
via USB and the DevicePerformDiscovery function will then instruct it to open a connection to one of those 
devices by passing in a specific index from the list and receiving a handle to the connection. 
One common question is how the appropriate index value for the Select parameter should be determined. For 
those users who can assume that only one NeoFox device will be connected to the system, the simple answer is 
to pass this parameter a value of 0. Some users may need to account for the scenario where multiple NeoFox 
units are present in the system, but only one particular unit is to be opened. In this case, the suggested approach 
is to open all available NeoFox units and query their names directly, then close connections to all but the target 
device. Note that the number of unopened devices attached to the system at any time is returned by the 
DevicePerformDiscovery function. 
 
int ApplicationShutdown() 
 
Description 
Terminates the DLL’s thread and performs cleanup operations.
 
Parameters 
None
 
Return Value 
Returns 1 if successful.
 
int DeviceClose(int hDevice) 
 
Description 
Terminates a connection to a particular device.
 
Parameters 
int
hDevice
Handle to an open NeoFox device.
 
Return Value 
Returns 1 if successful.