Hello
CVI names some of its function in the same way as the Windows SDK, they are the following:
OpenFile, ReadFile, WriteFile, GetSystemTime, SetSystemTime, Beep, CopyFile, DeleteFile, GetFileTime, SetFileTime, GetFileSize
In order to use them, you must include either the widows header or the CVI header for the function. Placing the window,h after the cvi header will give you re-definition errors.
If you include the CVI header after the windows header, the function will automatically default to the CVI ReadFile function. If you need to have both the windows and the CVI headers included, you should undef the particular function like the following if to use the SDK's definition of the function:
#include
#include
#undef ReadFile
This will make the compiler use the SDK function, without the undef, the compiler would use the CVI ReadFile function.
So whenever you use the windows sdk functions, make sure that the include windows.h statement is always the very first one.
I hope this helps
Bilal Durrani
NI
Bilal Durrani
NI