There are some conflicts between the CVI libraries and the SDK: some functions have the same names.
The way to handle the problem is to always include windows.h *before* you include the CVI headers. This allows the CVI header files to detect the conflict and fix it.
What you have included here is not enough for me to know why you are getting the error. You have attached the relevant lines from rpcndr.h, which is fine, but this compile error suggests that wchar_t is being defined, differently, by another header file included earlier. Do you know what that header file is?
What is the exact set of header files that you are including in this source file?
Louis, I am down to 3 files with the error "rpcndr.h"(172,31) Redeclaration of 'wchar_t'.
Now, I am not including rpcndr.h directly. I suspect that one of the includes that I do have includes something that includes that. Here is a listing of the includes from one of those three files:
You should use the source code browser (Tools>>Source Code Browser) to inspect your include file hierarchy. When the browser window comes up, type the name of the source file in the Indentifier/Filename box, then select "Included headers" from the middle column. You can then examine the tree in the column on the right. That should let you find the first place where rpcndr.h is being included. You will then need to find where else wchar_t is being defined.
Another way to debug include file problems is to use the #error directive liberally to see what section of code is being included when you compile a file. The preprocessor will stop at the first #error it finds, so you will see what is and is not being compiled (useful when there are a lot of messy #ifdef's).
Finally, I would try copying the line that gives you the error ("typedef unsigned short wchar_t") to all sorts of places in the included headers to see where the cutoff point is: in other words, when does it go from a harmless typedef to a compile error?
It's not Source Code Control, it's Source Code Browser. But this feature was only introduced back in version 6, so if your version is 5.5 you don't have it. I guess that leaves you with the other two suggestions.