jolly
VIP Member
... with snprintf, you should be able to print zero characters into buffer NULL to find out how many characters you need in a buffer, e.g.
nSize = jdeSnprintf(NULL, 0, _J(""%s %s"), szName, szValue);
You can then jdeAlloc nSize * sizeof(JCHAR) and know it will be the right size.
However, when I call the above it immediately explodes with a memory violation. I suspect JDE have messed this up. It's not #defined as a macro to a character set defined snprintf or snwprintf.
Remarkably, jdeSnprintf never appears within the application source code!
Is it just me or has anyone else run into this apparent flaw?
Cheers
nSize = jdeSnprintf(NULL, 0, _J(""%s %s"), szName, szValue);
You can then jdeAlloc nSize * sizeof(JCHAR) and know it will be the right size.
However, when I call the above it immediately explodes with a memory violation. I suspect JDE have messed this up. It's not #defined as a macro to a character set defined snprintf or snwprintf.
Remarkably, jdeSnprintf never appears within the application source code!
Is it just me or has anyone else run into this apparent flaw?
Cheers