Should DevicesInitialized() be called after every InitializeDevices() call?
In the InitializeDevices() function of the sample plug-in, whether a device is found or not, it calls the Ranger function DevicesInitialized(). So presumably calling this function doesn't mean the device has actually been initialized but only that the plugin's InitializeDevices() function is done working. This isn't a problem; I just wanted to get confirmation that this is the correct meaning.
Since it may take some time to power-up the scanner(s), your plug-in should return quickly from its InitializeDevices() function so that it does not block the application and Ranger. Later your plug-in will call DevicesInitialized() when your scanner(s) is powered up and ready to go, or if no scanners are functional.
Related Articles
Should DeviceConnected() be called for each check scanner?
The first plug-in function that gets called is AreDevicesAttached(). Since it returns what is essentially a yes or no answer, it presumably only reports that one or more devices are found to be available (attached) but not how many. If it returns ...
Which plug-in methods should have a call to AFX_MANAGE_STATE MFC state macro
This call ensures that the MFC state is correct. In order to guaruntee interoperabilty between plug-in versions and ranger versions AFX_MANAGE_STATE(AfxGetStaticModuleState()) should be called as the first call in any method called by Ranger. This ...
Should Ranger call my GetUniqueOptionsSupported() function?
No, Ranger does not call GetUniqueOptionsSupported(). However, applications such as RangerFlex may call this function to determine which unique options are available. Ranger® - The universal check scanner interface Copyright © 2023 Silver Bullet ...
Why does SetEndorseText() in the SetItemOutput() event fail on the CR-180?
You'll probably notice when you call SetEndorseText() on the CR-180 that it returns false. When any function in Ranger returns false, you can always check the Ranger log for a more detailed explanation. In this case the log it would contain: WARNING: ...
How to properly use Ranger Shutdown()
Why can't we call Shutdown() in every Ranger state? Many low-level scanner drivers require that they be shutdown in a specific orderly sequence. If they are abruptly disconnected, it can leave the scanner and/or device driver in an unexpected, and ...