Re: [try 2] user32: GetMenuStringA now returns correct buffer length for multibyte menu text. (with test)
Hi Zhangrong, +static inline unsigned int strlenW( const WCHAR *str ) +{ + const WCHAR *s = str; + while (*s) s++; + return s - str; +} Is there some reason you can't just use lstrlenW? --Juan
Hmm, cause GetMenuStringW uses strlenW, so I just copy it. 2008/7/3 Juan Lang <juan.lang(a)gmail.com>:
Hi Zhangrong,
+static inline unsigned int strlenW( const WCHAR *str ) +{ + const WCHAR *s = str; + while (*s) s++; + return s - str; +}
Is there some reason you can't just use lstrlenW? --Juan
-- $ apt-get moo (__) (oo) /------\/ / | || * /\---/\ ~~ ~~ ...."Have you mooed today?"...
Oh, I see, cross-test on Windows 95/98/Me maybe fail if uses lstrlenW. See http://msdn.microsoft.com/en-us/library/ms647492(VS.85).aspx Windows 95/98/Me: Although lstrlenW exists on Microsoft Windows 95/98/Me, it is supported by the Microsoft Layer for Unicode (MSLU) to give more consistent behavior across all Windows operating systems. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems. 2008/7/3 Huang, Zhangrong <hzhrong(a)gmail.com>:
Hmm, cause GetMenuStringW uses strlenW, so I just copy it.
-- $ apt-get moo (__) (oo) /------\/ / | || * /\---/\ ~~ ~~ ...."Have you mooed today?"...
participants (2)
-
Huang, Zhangrong -
Juan Lang