[PATCH] svchost: Implementation of svchost (revised submission)

James Hawkins truiken at gmail.com
Tue Nov 27 15:37:50 CST 2007

On Nov 27, 2007 3:21 PM, Roy Shea <roy at cs.hmc.edu> wrote:
> This is a revised and standalone version of svchost patch.  Changes in
> this revision include:
> - Unicode based with a simple UNICODE to ASCII function used to
>   convert the lpProcName passed into GetProcAddress

I think you're misunderstanding Wine's policy about not using ansi
functions or constant strings.  That only applies to external APIs
because we don't want to convert from unicode to ansi (lossy).
There's nothing wrong with just using:

GetProcAddress(library, "ServiceMain");

There aren't many instances where W->A is valid.

> - Using HEAP_ZERO_MEMORY flag in calls to HeapAlloc and HeapReAlloc
>   that are allocating space for a string and the NULL terminator to
>   set the NULL terminator to zero.

Why HEAP_ZERO_MEMORY when you can just set the last byte to NULL?

str[LEN - 1] = '\0';

James Hawkins

More information about the wine-devel mailing list