Hello,
The Windows SDK also contains a OpenFile and CloseFile functions. I assume that you are using CVI OpenFile and CloseFile functions.
Do you get the error (-1 return value) persistently when used on the particular machine? Have you tried on multiple machines with the same architecture, and get the same error? If so, could you please let me know what kind of PC you are using?
Also, have you tried to use the Windows SDK OpenFile and CloseFile functions in CVI? If not, could you try and see if you still get the same error? If you include just the WINDOWS.H header file and do not include the CVI header file with the same function, the non-CVI library will typically resolve properly for a listed function that we duplicated.
Mika Fukuchi
Application Engine
er
National Instruments