The function releases OS resources allocated for work with CAP file and stops
HNFileAdapter internal threads.
While processing traffic by HNQueue component
(see HNFileAdapter.Queue) you should remember that
HNQueue object can be deleted only after
CloseFile function call, otherwise an early
HNQueue object deletion will lead to the application crash.