Can Sscanf read a 64-bit number?

May 20, 2008
Syracuse, NY, USA
You're using Visual C++, right? The RTL's sscanf() and swscanf() can do 64-bit integers.

(No, I don't know whether HANDLEs are larger in x64 Windows.)
A handle is a pointer (void*). So it should be 64 bits in 64-bit Windows. But it wouldn't surprise me a bit (no pun) if Windows kept HANDLEs (as opposed to more generic pointers to places in memory) below 32 bits. If that's so then Sscanf() would just stuff it into the low 32 bits of a 64-bit field, and that should be OK.

I like to avoid as much RTL stuff as I can. I'll bet using swscanf() would increase a plugin's size by 10K or so (static linking).

Edit: Make that 16K.
Last edited: