Eric van Beurden : dbghelp: Return TRUE in SymInitializeW if process is already initialized and add an ERR to SymCleanup .
Alexandre Julliard
julliard at winehq.org
Fri Jan 18 06:34:02 CST 2008
Module: wine
Branch: master
Commit: a5a35ec211cadeae2319607931d32aa23547adbd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a5a35ec211cadeae2319607931d32aa23547adbd
Author: Eric van Beurden <ericvb at transgaming.com>
Date: Thu Jan 17 15:47:55 2008 -0500
dbghelp: Return TRUE in SymInitializeW if process is already initialized and add an ERR to SymCleanup.
---
dlls/dbghelp/dbghelp.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c
index dc3b86a..fba22d0 100644
--- a/dlls/dbghelp/dbghelp.c
+++ b/dlls/dbghelp/dbghelp.c
@@ -268,8 +268,14 @@ BOOL WINAPI SymInitializeW(HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeP
TRACE("(%p %s %u)\n", hProcess, debugstr_w(UserSearchPath), fInvadeProcess);
- if (process_find_by_handle(hProcess))
- FIXME("what to do ??\n");
+ if (process_find_by_handle(hProcess)){
+ WARN("the symbols for this process have already been initialized!\n");
+
+ /* MSDN says to only call this function once unless SymCleanup() has been called since the last call.
+ It also says to call SymRefreshModuleList() instead if you just want the module list refreshed.
+ Native still returns TRUE even if the process has already been initialized. */
+ return TRUE;
+ }
pcs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pcs));
if (!pcs) return FALSE;
@@ -379,6 +385,8 @@ BOOL WINAPI SymCleanup(HANDLE hProcess)
return TRUE;
}
}
+
+ ERR("this process has not had SymInitialize() called for it!\n");
return FALSE;
}
More information about the wine-cvs
mailing list