Problem:
After calling CBL_DIR_SCAN_START with return code of zero, CBL_DIR_SCAN_READ fails with return code 127.
Resolution:
Make sure the path provided in CBL_DIR_SCAN_START does not contain any double quotes.
If you called CBL_GET_CURRENT_DIR to get the current directory and the path contains spacey directory name, the returned path will be quoted (e.g. "C:\\Documents and Settings\\UserID\\My Documents\\My Current Directory"). If you use this quoted path in CBL_DIR_SCAN_START, it would return a zero return code, but CBL_DIR_SCAN_READ will fail with return code of 127.