Workaround needed for sprintf in Windows 7
I am working on a program for instrumentation hardware using Visual Studio C++ on the .NET 2003 framework. The code would work fine on XP, but we're trying to get everything on Windows 7. Almost all the conversion problems have been handled, but the "sprintf" is still have its problems. They compile fine, but when I run tests using the hardware, it throws up a buffer overflow exception. Is there a more elegant way of working around sprintf on Windows 7. I've heard of sprintf_s, but a little reading told me that it isn't compatible with Windows 7.
The line of code I'm having trouble with is:
I'm very new to this, and would really appreciate the help. I hope this is the right forum to ask this question to.
sprintf(Pxi6509::DeviceDescriptor, "PXI1Slot%i", DeviceNo);