Nikolay Sivov : shell32: Added GetCurrentProcessExplicitAppUserModelID() stub.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jul 22 13:40:38 CDT 2015


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Jul 22 12:51:29 2015 +0300

shell32: Added GetCurrentProcessExplicitAppUserModelID() stub.

---

 .../api-ms-win-downlevel-shell32-l1-1-0.spec       |  2 +-
 dlls/shell32/shell32.spec                          |  1 +
 dlls/shell32/shell32_main.c                        | 10 ++++++++
 dlls/shell32/tests/appbar.c                        | 27 +++++++++++++++++++++-
 4 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/dlls/api-ms-win-downlevel-shell32-l1-1-0/api-ms-win-downlevel-shell32-l1-1-0.spec b/dlls/api-ms-win-downlevel-shell32-l1-1-0/api-ms-win-downlevel-shell32-l1-1-0.spec
index 9e51a4a..9d03c03 100644
--- a/dlls/api-ms-win-downlevel-shell32-l1-1-0/api-ms-win-downlevel-shell32-l1-1-0.spec
+++ b/dlls/api-ms-win-downlevel-shell32-l1-1-0/api-ms-win-downlevel-shell32-l1-1-0.spec
@@ -1,3 +1,3 @@
 @ stdcall CommandLineToArgvW(wstr ptr) shell32.CommandLineToArgvW
-@ stub GetCurrentProcessExplicitAppUserModelID
+@ stdcall GetCurrentProcessExplicitAppUserModelID(ptr) shell32.GetCurrentProcessExplicitAppUserModelID
 @ stdcall SetCurrentProcessExplicitAppUserModelID(wstr) shell32.SetCurrentProcessExplicitAppUserModelID
diff --git a/dlls/shell32/shell32.spec b/dlls/shell32/shell32.spec
index ed34919..ce3a9f7 100644
--- a/dlls/shell32/shell32.spec
+++ b/dlls/shell32/shell32.spec
@@ -310,6 +310,7 @@
 @ stdcall FindExecutableW(wstr wstr ptr)
 @ stub FixupOptionalComponents
 @ stdcall FreeIconList(long)
+@ stdcall GetCurrentProcessExplicitAppUserModelID(ptr)
 @ stdcall InitNetworkAddressControl()
 @ stub InternalExtractIconListA
 @ stub InternalExtractIconListW
diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c
index cabf5e4..fd4b8c8 100644
--- a/dlls/shell32/shell32_main.c
+++ b/dlls/shell32/shell32_main.c
@@ -1378,6 +1378,16 @@ HRESULT WINAPI SetCurrentProcessExplicitAppUserModelID(PCWSTR appid)
 }
 
 /***********************************************************************
+ *              GetCurrentProcessExplicitAppUserModelID (SHELL32.@)
+ */
+HRESULT WINAPI GetCurrentProcessExplicitAppUserModelID(PWSTR *appid)
+{
+    FIXME("%p: stub\n", appid);
+    *appid = NULL;
+    return E_NOTIMPL;
+}
+
+/***********************************************************************
  *              SHSetUnreadMailCountW (SHELL32.@)
  */
 HRESULT WINAPI SHSetUnreadMailCountW(LPCWSTR mailaddress, DWORD count, LPCWSTR executecommand)
diff --git a/dlls/shell32/tests/appbar.c b/dlls/shell32/tests/appbar.c
index 7675493..8138131 100644
--- a/dlls/shell32/tests/appbar.c
+++ b/dlls/shell32/tests/appbar.c
@@ -29,6 +29,7 @@
 static const CHAR testwindow_class[] = "testwindow";
 
 static HMONITOR (WINAPI *pMonitorFromWindow)(HWND, DWORD);
+static HRESULT (WINAPI *pGetCurrentProcessExplicitAppUserModelID)(PWSTR*);
 
 typedef BOOL (*boolean_function)(void);
 
@@ -430,15 +431,39 @@ static void test_appbarget(void)
     return;
 }
 
+static void test_GetCurrentProcessExplicitAppUserModelID(void)
+{
+    WCHAR *appid;
+    HRESULT hr;
+
+    if (!pGetCurrentProcessExplicitAppUserModelID)
+    {
+        win_skip("GetCurrentProcessExplicitAppUserModelID() is not supported.\n");
+        return;
+    }
+
+if (0) /* crashes on native */
+    hr = pGetCurrentProcessExplicitAppUserModelID(NULL);
+
+    appid = (void*)0xdeadbeef;
+    hr = pGetCurrentProcessExplicitAppUserModelID(&appid);
+todo_wine
+    ok(hr == E_FAIL, "got 0x%08x\n", hr);
+    ok(appid == NULL, "got %p\n", appid);
+}
+
 START_TEST(appbar)
 {
-    HMODULE huser32;
+    HMODULE huser32, hshell32;
 
     huser32 = GetModuleHandleA("user32.dll");
+    hshell32 = GetModuleHandleA("shell32.dll");
     pMonitorFromWindow = (void*)GetProcAddress(huser32, "MonitorFromWindow");
+    pGetCurrentProcessExplicitAppUserModelID = (void*)GetProcAddress(hshell32, "GetCurrentProcessExplicitAppUserModelID");
 
     register_testwindow_class();
 
     test_setpos();
     test_appbarget();
+    test_GetCurrentProcessExplicitAppUserModelID();
 }




More information about the wine-cvs mailing list