user32: GetClassName should return the number of chars copied.

Mike McCormack mike at
Sun Oct 22 12:30:11 CDT 2006

Dmitry Timoshkov wrote:

> This won't work as expected if hwnd is invalid and buffer contains
> some '\0' terminated data. Probably a better aproach would be to call
> GlobalGetAtomNameA with a buffer of size MAX_ATOM_LEN + 1 allocated
> on the stack (MAX_ATOM_LEN is defined in dlls/kernel32/atom.c as 255)
> and only if the call succeeds copy the data. GetClassNameW neededs
> to be fixed as well.

Yes, I realize GetClassNameW needs to be fixed, but it was late and I 
just wanted to get the fix out for comment... which I got... thanks.

Maybe it would be better to call NtQueryInformationAtom directly in this 
case rather than working around deficiencies in GlobalGetAtomName?


More information about the wine-devel mailing list