[PATCH] Add undocumented function to unify MultiByteToWideChar conversation

Marcus Meissner marcus at jet.franken.de
Thu Apr 28 03:03:42 CDT 2011


On Thu, Apr 28, 2011 at 09:54:13AM +0200, Alexey Fisher wrote:
> Am Donnerstag, den 28.04.2011, 09:25 +0200 schrieb Marcus Meissner:
> > On Thu, Apr 28, 2011 at 09:03:51AM +0200, Alexey Fisher wrote:
> > > Am Donnerstag, den 28.04.2011, 10:49 +0400 schrieb Nikolay Sivov:
> > > > On 4/28/2011 10:45, Alexey Fisher wrote:
> > > > > MultiByteToWideChar are called directly only from one function. All other
> > > > > colls in comctl32 go thrue this function.
> > > > 
> > > > > It was recovered with from dissassambled code.
> > > > This is not allowed in Wine development. All you can use is tests, but 
> > > > after this patch you're most likely banned (from comctl32 changes at least).
> > > 
> > > Ouch... bad start.
> > > Hmm... but this code is present in wine-comctl32, it just spread in
> > > different parts.
> > 
> > We do not need to follow the original comctl32 bytewise.
> > 
> > You will find however functions called "head_strdupA2W" occasionaly
> > 
> > eg. dlls/wininet/internet.h:heap_strdupWtoA()
> > and heap_strdupAtoW()
> > 
> > if you need to factor out such common tasks as string allocation + conversion.
> 
> May be it make sense to place this function to winebase? Looks like
> there is some duplicates:
> dlls/mshtml/mshtml_private.h:static inline char *heap_strdupWtoA(LPCWSTR
> str)
> dlls/wininet/internet.h:static inline char *heap_strdupWtoA(LPCWSTR str)
> dlls/appwiz.cpl/addons.c:static inline char *heap_strdupWtoA(LPCWSTR
> str)

No, as it is not an officially exported API we cannot export it from public headers

Ciao, Marcus



More information about the wine-devel mailing list