Question about libwine_unicode functions and others in WINE

Robert Shearman R.J.Shearman at warwick.ac.uk
Tue Dec 2 10:45:04 CST 2003


> -----Original Message-----
> From: wine-devel-admin at winehq.org [mailto:wine-devel-admin at winehq.org]On
> Behalf Of Steven Edwards
> Sent: 01 December 2003 00:03
> To: wine-devel at winehq.com
> Subject: Question about libwine_unicode functions and others in WINE
>
> Hello,
> We are looking at porting more code from WINE to ReactOS and I am
> having trouble understanding the need for libwine_unicode as a shared
> library. Some of the functions that it exports such as CompareString
> are implemented in ntdll as RtlCompareString and then also used in
> shlwapi as per a recent patch. Wouldnt it better to import the function
> from ntdll and hide libwine_unicode or make the parts that we need to
> share a static library? In ReactOS we have created NT compatible NLS
> files. Could WINE do this also and dump libwine_nicode?

As noted by others, we don't want to create an unnecessary dependency on
ntdll and more importantly we don't want to scare people off by using
"undocumented" functions everywhere.
However, couldn't we just replace the libwine_unicode function with an
appropriate (well-documented) kernel32 string function:
strcatW -> lstrcatW
strcmpW -> lstrcmpW
strcpyW -> lstrcpyW
strlenW -> lstrlenW
...
etc
It may add a little bit of overhead in Wine (which we could possibly solve
by adding #define's for e.g. lstrcatW -> strcatW), but it would solve the
problem. We will still use libwine_unicode for the backend implementation of
the string functions and for the tools, but it wouldn't matter for ReactOS.
It would probably be best to add this as another janitorial project if we go
for it. You can quite easily see which dlls use libwine_unicode as it links
to it in the makefile.

Rob





More information about the wine-devel mailing list