Whenever names in CVI collide with names in the SDK, what we typically do is to prepend CVI_ to the function name. Then in the header file, we use a macro to translate one name to the other (ex. #define CopyFile CVI_CopyFile). Therefore, if you want to expose the SDK CopyFile, after you include utility.h, do an #undef CopyFile. Normally this would work, except the SDK function call is ALSO a macro; CopyFile references CopyFileA or CopyFileW, depending on your system. So, you can either call CopyFileA directly (CopyFileW is for unicode filenames) or do this:
#include "windows.h"
#include "utility.h"
#undef CopyFile
#ifdef UNICODE
#define CopyFile CopyFileW
#else
#define CopyFile CopyFileA
#endif // !UNICODE
int func (void)
{
const char *a = "a.txt", *b = "b.txt";
CopyFile (a, b, FALSE); // fine, calls the SDK function
CVI_CopyFile (a, b); // also fine, calls the CVI function
}
On a side note, I have been trying to reproduce a failure like this in house and have not been able to. Could you give me some more details on your system configuration, etc.? What version of CVI and what version of Windows is this under? Also, what version of the CVI runtime engine is installed?
Hope this helps.
Thanks,
-alex