[ros-dev] [ros-diffs] [hbelusca] 65336: [NTVDM]: Use variable-length buffers in DisplayMessage, in case we display a very long message (uses the _vscwprintf CRT function, not available on Win2k. You need to recompile NT...

Timo Kreuzer timo.kreuzer at web.de
Sun Nov 9 09:05:19 UTC 2014


Am 09.11.2014 02:46, schrieb hbelusca at svn.reactos.org:
> Author: hbelusca
> Date: Sun Nov  9 01:46:31 2014
> New Revision: 65336
>
> URL: http://svn.reactos.org/svn/reactos?rev=65336&view=rev
> Log:
> [NTVDM]: Use variable-length buffers in DisplayMessage, in case we display a very long message (uses the _vscwprintf CRT function, not available on Win2k. You need to recompile NTVDM with WIN2K_COMPLIANT define if you want to be able to run it on win2k. In that case DisplayMessage uses a quite large enough buffer for its needs). If somebody knows an alternative to _vscwprintf that does the very same job, and which exists on Win2k, I would be happy to use it instead.
Since _vscwprintf will do the whole work already anyway, you could as 
well directly print it into the static buffer. You could use _vsnwprintf 
or StringCbPrintfW, which internally uses the former, and use the result 
to decide whether the buffer was large enough. This will be more 
performant, since you only need to print once, when the buffer is large 
enough.




More information about the Ros-dev mailing list