From c57255b7bcbe0b456e4934de9fb0efa123e369ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 02:01:59 +0100
Subject: combase: Add stub for RoRegisterForApartmentShutdown.

---
 .../api-ms-win-core-winrt-l1-1-0.spec                  |  2 +-
 dlls/combase/combase.spec                              |  2 +-
 dlls/combase/roapi.c                                   | 18 ++++++++++++++++++
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec b/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec
index 88139fb..d27130c 100644
--- a/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec
+++ b/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec
@@ -3,7 +3,7 @@
 @ stdcall RoGetApartmentIdentifier(ptr) combase.RoGetApartmentIdentifier
 @ stdcall RoInitialize(long) combase.RoInitialize
 @ stub RoRegisterActivationFactories
-@ stub RoRegisterForApartmentShutdown
+@ stdcall RoRegisterForApartmentShutdown(ptr ptr ptr) combase.RoRegisterForApartmentShutdown
 @ stub RoRevokeActivationFactories
 @ stdcall RoUninitialize() combase.RoUninitialize
 @ stub RoUnregisterForApartmentShutdown
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec
index 3bf0bf2..7ae1f6e 100644
--- a/dlls/combase/combase.spec
+++ b/dlls/combase/combase.spec
@@ -263,7 +263,7 @@
 @ stub RoOriginateLanguageException
 @ stub RoParameterizedTypeExtraGetTypeSignature
 @ stub RoRegisterActivationFactories
-@ stub RoRegisterForApartmentShutdown
+@ stdcall RoRegisterForApartmentShutdown(ptr ptr ptr)
 @ stub RoReportCapabilityCheckFailure
 @ stub RoReportFailedDelegate
 @ stub RoReportUnhandledError
diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c
index cd545f1..035fa47 100644
--- a/dlls/combase/roapi.c
+++ b/dlls/combase/roapi.c
@@ -218,3 +218,21 @@ HRESULT WINAPI RoGetApartmentIdentifier(UINT64 *identifier)
     *identifier = 0xdeadbeef;
     return S_OK;
 }
+
+/***********************************************************************
+ *      RoRegisterForApartmentShutdown (combase.@)
+ */
+HRESULT WINAPI RoRegisterForApartmentShutdown(IApartmentShutdown *callback,
+        UINT64 *identifier, APARTMENT_SHUTDOWN_REGISTRATION_COOKIE *cookie)
+{
+    HRESULT hr;
+
+    FIXME("(%p, %p, %p): stub\n", callback, identifier, cookie);
+
+    hr = RoGetApartmentIdentifier(identifier);
+    if (FAILED(hr))
+        return hr;
+
+    *cookie = (void *)0xcafecafe;
+    return S_OK;
+}
-- 
2.6.4

