From c719263b29aee8a6c71fe515643d4680788bfd2a Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 18 Nov 2017 10:04:03 +0000 Subject: [PATCH 1/2] Remove PerformWSManPluginReportCompletion from pwrshplugin.dll to resolve issue 5391 --- .../nativemsh/pwrshplugin/pwrshplugin.def | 1 - .../nativemsh/pwrshplugin/pwrshplugin.h | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.def b/src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.def index af45f5c785a..ef1208d3875 100644 --- a/src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.def +++ b/src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.def @@ -15,4 +15,3 @@ WSManPluginSend WSManPluginSignal WSManPluginReceive WSManPluginConnect -PerformWSManPluginReportCompletion diff --git a/src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.h b/src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.h index 7d2f25d94fe..27640e03b71 100644 --- a/src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.h +++ b/src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.h @@ -1090,13 +1090,3 @@ class PwrshPlugInMediator return version; } }; - -extern "C" -void WINAPI PerformWSManPluginReportCompletion() -{ - // Now report the plugin completion, to indicate that plugin is ready to shutdown. - // This API is used by plugins to report completion - // - pluginContext MUST be the same context that plugin provided to the WSManPluginStartup method - // - flags are reserved, so 0 - WSManPluginReportCompletion(g_pPluginContext, 0); -} From 44c0c1e0941b802fbddfca72f5d0df17625d730e Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 18 Nov 2017 10:20:15 +0000 Subject: [PATCH 2/2] Remove g_pPluginContext member, which is now unused as well and was only used for WSManPluginReportCompletion --- src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.h b/src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.h index 27640e03b71..5721e80ceaf 100644 --- a/src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.h +++ b/src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.h @@ -26,10 +26,6 @@ using namespace NativeMsh; // Forward declaration of class PwrshPlugIn class PwrshPlugIn; -// To report the plugin completion using WSManPluginReportCompletion API -// g_pPluginContext MUST be the same context that plugin provided to the WSManPluginStartup method -PwrshPlugIn* g_pPluginContext; - class PwrshPlugIn { private: @@ -230,7 +226,6 @@ class PwrshPlugInMediator // storing the extra info for plugin use later. VerifyAndStoreExtraInfo(extraInfo, &initParameters); PwrshPlugIn* result = new PwrshPlugIn(applicationIdentification, initParameters); - g_pPluginContext = result; return result; }