LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating CSV file according with the international settings

Smiley Happy I am glad it's not only me...

 

I just tried it with the following result:

 

    GetLocaleInfoEx (LOCALE_NAME_USER_DEFAULT, LOCALE_SLIST, (LPWSTR)msg, 8);
    DebugPrintf ("List separator: %s\n", msg);

 

in my source code works as expected, provided I add the compiler defne (VISTA or newer)

 

However, in the interactive execution, with the same compiler define, the following code

 

#include <windows.h>

    static char    msg[8];

    GetLocaleInfoEx (LOCALE_NAME_USER_DEFAULT, LOCALE_SLIST, (LPWSTR)msg, 8);

 

gives an error:

 

Interactive Execution - 1 error, 1 warning
 5, 62    warning: cast from 'char *' to 'LPWSTR' (aka 'unsigned short *') increases required alignment from 1 to 2
 1, 1   error: Unresolved symbol: GetLocaleInfoEx

 

.... ah yes, and a question / suggestion... why is /DWINVER=_WIN32_WINNT_WIN7 not added by default - CVI2015 does not support Windows XP and VISTA anymore....?

0 Kudos
Message 11 of 14
(2,204 Views)

My apologies for not having actually tested this before posting. I too was able to reproduce this linker error and, unlike the missing prototype compiler error, this one does seem to be related to the interactive window.

 

As best I can tell, you're running into a form of this issue. I can't explain why this happens for some SDK functions, but not for others -- even for functions that are also in kernel32.lib (e.g. LoadLibrary).

 

Wolfgang: I had forgotten that CVI 2015 no longer supports XP. You are correct. The default value of WINVER should not have been _WIN32_WINNT_WINXP. I've written CAR 544425 to address this.

 

Roberto: the macros are per-project (and per-build configuration!). You can look through this topic if you're ever unsure of the scope of some option in CVI.

Message 12 of 14
(2,187 Views)

@LuisG wrote:
Roberto: the macros are per-project (and per-build configuration!). You can look through this topic if you're ever unsure of the scope of some option in CVI.

Thank you for this list, I wasn't aware of this useful compilation.

 

0 Kudos
Message 13 of 14
(2,175 Views)

That's indeed very useful: thank you for taking it to my attention! I'll save that page in my favourites.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 14 of 14
(2,168 Views)