-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-11-10 14:05, schrieb Jonathan Vollebregt:
Unfortunately if I pass in anything besides a pointer it will segfault. It actually wants a format string "%1!d!" for ints which is hardly compact (Especially since we have to type it out in a WCHAR array)
There must be a better way to get the size of the string...
Fwiw, I cannot really comment on this patch because I have no experience with output handling. I'm afraid the two of you have to come to an agreement on your own.
Just two general observations: *) The entire console writing code is terribly verbose, but I guess that's the Windows API's fault. What may help is a helper file similar to include/wine/list.h that contains this code, so it doesn't have to be re-coded in every program. I haven't looked at the individual implementations though.
*) I see the static buffer passed to LoadString as a relatively minor issue because the length of those strings is fixed. Translations may cause problems I guess.
Does SizeofResource() help here? I'm a bit confused re HMODULE and HINSTANCE.