Hey guys,
For those of you who aren't aware of it yet, the stdio library doesn't fully support __int64 variables in formatting specifiers. Very specifically, the sprintf() function--perhaps the entire printf() family--will not let you format an __int64 into a string.
NI gave me a workaround today by moving me over to the Fmt() family of functions in the formatio library (in place of sprintf()). If you will be doing this type of conversion in your future CVI-developed software, please take note and save yourself some time of banging your head against the wall. Here is an example of __int64 formatting that works as expected, as discovered through my service request today.
#include <utility.h>
#include <formatio.h>
__int64 number = 12345;
char mystring[50];
Fmt (mystring, "%s<%i[b8]", number);
There doesn't appear to be any way to do this properly with sprintf(). I doubt if the scanf() family works either--but I have not tried it yet. Perhaps this is a C89 vs. C99 thing. Personally, I think this was an oversight going as far back as CVI 7 but it is quite frustrating. This should either be corrected in the CVI 8.0.2 maintenance release or NI needs to clarify on all CVI webpages (including product advertisements) that __int64 support continues to be cursory.
Orlan