On Nov 27, 2007 3:21 PM, Roy Shea roy@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';