Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- include/featurestagingapi.h | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 include/featurestagingapi.h
diff --git a/include/featurestagingapi.h b/include/featurestagingapi.h new file mode 100644 index 00000000000..d0220b210f0 --- /dev/null +++ b/include/featurestagingapi.h @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2021 Alex Henrie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _FEATURESTAGINGAPI_H_ +#define _FEATURESTAGINGAPI_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +DECLARE_HANDLE(FEATURE_STATE_CHANGE_SUBSCRIPTION); + +typedef void WINAPI FEATURE_STATE_CHANGE_CALLBACK(void*); + +typedef enum FEATURE_CHANGE_TIME +{ + FEATURE_CHANGE_TIME_READ = 0, + FEATURE_CHANGE_TIME_MODULE_RELOAD = 1, + FEATURE_CHANGE_TIME_SESSION = 2, + FEATURE_CHANGE_TIME_REBOOT = 3 +} FEATURE_CHANGE_TIME; + +typedef enum FEATURE_ENABLED_STATE +{ + FEATURE_ENABLED_STATE_DEFAULT = 0, + FEATURE_ENABLED_STATE_DISABLED = 1, + FEATURE_ENABLED_STATE_ENABLED = 2 +} FEATURE_ENABLED_STATE; + +#ifdef __cplusplus +} +#endif + +#endif
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52077 Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- .../api-ms-win-core-featurestaging-l1-1-0.spec | 2 +- dlls/shcore/main.c | 10 ++++++++++ dlls/shcore/shcore.spec | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/api-ms-win-core-featurestaging-l1-1-0/api-ms-win-core-featurestaging-l1-1-0.spec b/dlls/api-ms-win-core-featurestaging-l1-1-0/api-ms-win-core-featurestaging-l1-1-0.spec index ab5127b7dfd..696e57f695a 100644 --- a/dlls/api-ms-win-core-featurestaging-l1-1-0/api-ms-win-core-featurestaging-l1-1-0.spec +++ b/dlls/api-ms-win-core-featurestaging-l1-1-0/api-ms-win-core-featurestaging-l1-1-0.spec @@ -1,5 +1,5 @@ @ stub GetFeatureEnabledState @ stub RecordFeatureError @ stub RecordFeatureUsage -@ stub SubscribeFeatureStateChangeNotification +@ stdcall SubscribeFeatureStateChangeNotification(ptr ptr ptr) shcore.SubscribeFeatureStateChangeNotification @ stub UnsubscribeFeatureStateChangeNotification diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c index 82b236bb47d..213569b4acf 100644 --- a/dlls/shcore/main.c +++ b/dlls/shcore/main.c @@ -27,6 +27,7 @@ #include "winuser.h" #include "initguid.h" #include "ocidl.h" +#include "featurestagingapi.h" #include "shellscalingapi.h" #include "shlwapi.h"
@@ -2505,3 +2506,12 @@ BOOL WINAPI IsOS(DWORD feature)
return FALSE; } + +/************************************************************************* + * SubscribeFeatureStateChangeNotification [SHCORE.@] + */ +void WINAPI SubscribeFeatureStateChangeNotification(FEATURE_STATE_CHANGE_SUBSCRIPTION *subscription, + FEATURE_STATE_CHANGE_CALLBACK *callback, void *context) +{ + FIXME("(%p, %p, %p) stub\n", subscription, callback, context); +} diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec index a0bc8a2463b..836a90ee5cf 100644 --- a/dlls/shcore/shcore.spec +++ b/dlls/shcore/shcore.spec @@ -92,7 +92,7 @@ @ stdcall SetCurrentProcessExplicitAppUserModelID(wstr) @ stdcall SetProcessDpiAwareness(long) @ stdcall SetProcessReference(ptr) -# @ stub SubscribeFeatureStateChangeNotification +@ stdcall SubscribeFeatureStateChangeNotification(ptr ptr ptr) @ stub UnregisterScaleChangeEvent # @ stub UnsubscribeFeatureStateChangeNotification
Also for Windows PC Health Check.
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- .../api-ms-win-core-featurestaging-l1-1-0.spec | 2 +- dlls/shcore/main.c | 9 +++++++++ dlls/shcore/shcore.spec | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/dlls/api-ms-win-core-featurestaging-l1-1-0/api-ms-win-core-featurestaging-l1-1-0.spec b/dlls/api-ms-win-core-featurestaging-l1-1-0/api-ms-win-core-featurestaging-l1-1-0.spec index 696e57f695a..eb7bbe9460e 100644 --- a/dlls/api-ms-win-core-featurestaging-l1-1-0/api-ms-win-core-featurestaging-l1-1-0.spec +++ b/dlls/api-ms-win-core-featurestaging-l1-1-0/api-ms-win-core-featurestaging-l1-1-0.spec @@ -1,4 +1,4 @@ -@ stub GetFeatureEnabledState +@ stdcall GetFeatureEnabledState(long long) shcore.GetFeatureEnabledState @ stub RecordFeatureError @ stub RecordFeatureUsage @ stdcall SubscribeFeatureStateChangeNotification(ptr ptr ptr) shcore.SubscribeFeatureStateChangeNotification diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c index 213569b4acf..633628b4c72 100644 --- a/dlls/shcore/main.c +++ b/dlls/shcore/main.c @@ -2515,3 +2515,12 @@ void WINAPI SubscribeFeatureStateChangeNotification(FEATURE_STATE_CHANGE_SUBSCRI { FIXME("(%p, %p, %p) stub\n", subscription, callback, context); } + +/************************************************************************* + * GetFeatureEnabledState [SHCORE.@] + */ +FEATURE_ENABLED_STATE WINAPI GetFeatureEnabledState(UINT32 feature, FEATURE_CHANGE_TIME change_time) +{ + FIXME("(%u, %u) stub\n", feature, change_time); + return FEATURE_ENABLED_STATE_DEFAULT; +} diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec index 836a90ee5cf..9ed7c87b0fe 100644 --- a/dlls/shcore/shcore.spec +++ b/dlls/shcore/shcore.spec @@ -9,7 +9,7 @@ @ stdcall GetCurrentProcessExplicitAppUserModelID(ptr) @ stdcall GetDpiForMonitor(long long ptr ptr) @ stub GetDpiForShellUIComponent -# @ stub GetFeatureEnabledState +@ stdcall GetFeatureEnabledState(long long) # @ stub GetFeatureVariant @ stdcall GetProcessDpiAwareness(long ptr) @ stdcall GetProcessReference(ptr)