[Bug 29903] Some Microsoft debuggers fail to enumerate processes due to wtsapi32.WTSEnumerateProcessesW() being a stub (Microsoft Visual Studio 2005, DbgCLR from .NET 2.0 SDK)

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Jun 22 12:12:16 CDT 2014


http://bugs.winehq.org/show_bug.cgi?id=29903

Sebastian Lackner <sebastian at fds-team.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sebastian at fds-team.de

--- Comment #12 from Sebastian Lackner <sebastian at fds-team.de> ---
Created attachment 48860
  --> http://bugs.winehq.org/attachment.cgi?id=48860
wtsapi32: Partial implementation of WTSEnumerateProcessesW.

@Stefan:

I don't know why noone answered on wine-patches, but your patch had several
bugs. I've tried to fix them and will also try my luck to get it upstream, if
someone can confirm, that it still fixes the issue.

Changes:
* At various places with "return FALSE" no error code was set
* When iterating through the list of processes you skip over the last element
(because spi is updated before you check for the end-of-list condition).
* When the second HeapAlloc fails the memory is never deallocated
* Issues with pointer arithmetic, ProcessName.MaximumLength is already in
bytes, no need to multiply it with sizeof(WCHAR).
* As name is of type WCHAR, you should only add
ProcessName.MaximumLength/sizeof(WCHAR) to get to the next location in memory.
* WTSFreeMemory should be implemented in the same patch, otherwise you leak
memory.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list