Jacek Caban : kernel32: Added FindActCtxSectionStringA implementation.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jul 26 06:36:47 CDT 2007


Module: wine
Branch: master
Commit: dcbbd30064f87d88132b14eb0acd465d09ad45e7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=dcbbd30064f87d88132b14eb0acd465d09ad45e7

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Jul 25 20:37:49 2007 +0200

kernel32: Added FindActCtxSectionStringA implementation.

---

 dlls/kernel32/actctx.c |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/dlls/kernel32/actctx.c b/dlls/kernel32/actctx.c
index 33aa10e..4591d8b 100644
--- a/dlls/kernel32/actctx.c
+++ b/dlls/kernel32/actctx.c
@@ -219,10 +219,27 @@ BOOL WINAPI FindActCtxSectionStringA(DWORD dwFlags, const GUID* lpExtGuid,
                                     ULONG ulId, LPCSTR lpSearchStr,
                                     PACTCTX_SECTION_KEYED_DATA pInfo)
 {
-  FIXME("%08x %s %u %s %p\n", dwFlags, debugstr_guid(lpExtGuid),
-       ulId, debugstr_a(lpSearchStr), pInfo);
-  SetLastError( ERROR_CALL_NOT_IMPLEMENTED);
-  return FALSE;
+    LPWSTR  search_str;
+    DWORD   len;
+    BOOL    ret;
+
+    TRACE("%08x %s %u %s %p\n", dwFlags, debugstr_guid(lpExtGuid),
+          ulId, debugstr_a(lpSearchStr), pInfo);
+
+    if (!lpSearchStr)
+    {
+        SetLastError(ERROR_INVALID_PARAMETER);
+        return FALSE;
+    }
+
+    len = MultiByteToWideChar(CP_ACP, 0, lpSearchStr, -1, NULL, 0);
+    search_str = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+    MultiByteToWideChar(CP_ACP, 0, lpSearchStr, -1, search_str, len);
+
+    ret = FindActCtxSectionStringW(dwFlags, lpExtGuid, ulId, search_str, pInfo);
+
+    HeapFree(GetProcessHeap(), 0, search_str);
+    return ret;
 }
 
 /***********************************************************************




More information about the wine-cvs mailing list