some ntdll functions (2) - part 1: functions

thomas.mertes at gmx.at thomas.mertes at gmx.at
Fri Mar 7 06:37:50 CST 2003


Alexandre Julliard <julliard at winehq.com> writes:
> thomas.mertes at gmx.at writes:
> 
> > + *      _ultoa   (NTDLL.@)
> > + *
> > + * Converts an unsigned long integer to a string.
> > + *
> > + * Assigns a '\0' terminated string to str and returns str.
> > + * Does not check if radix is in the range of 2 to 36 (as native DLL).
> > + *
> > + * Difference:
> > + * - Does not crash on str == NULL (as native DLL).
> > + *   Instead requests the needed memory with RtlAllocateHeap.
> > + *   When RtlAllocateHeap fails: return NULL.
> 
> Please don't invent extensions to the API. If a function doesn't
> allocate memory under Windows it shouldn't allocate memory under Wine
> either.

The Reactos msvcrt functions have exactly this extension.
So I implemented the Reactos API (which is a superset of the M$ API).
And I did not make this decision without reason.

This is exactly the same strategy M$ uses with standards: extend and
embrace.
IMHO this is the right place for "extend and embrace":
The native function crashes in this case.
So currently no application will call this functions with str == NULL.

The extension makes sense. I can think of several good usages of this
extension.
Applications using the extended functionality will not run under native
windows.
Therefore I documented the extension as Difference.
Summary: Using the "extend and embrace" strategy against M$.

If an application wants to find out if it is running native or under wine
there
are always simpler possibilitys to find that out.

Please reconsider your position. If you still do not like extensions (even
under
this conditions) I am willing to send a new patch. May be extended
functionality
(which can happen elsewhere as well) can depend on the "Windows" config
entry ("Windows"="Reactos") or some other config option.

Greetings
Thomas Mertes

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!




More information about the wine-devel mailing list