Skip to content

Commit

Permalink
Remove PerformWSManPluginReportCompletion from pwrshplugin.dll (Power…
Browse files Browse the repository at this point in the history
…Shell#5498)

This resolves issue PowerShell#5391, which is tagged with 6.0.0-GA, therefore this should help with getting pwsh out of the door in January.

It removes PerformWSManPluginReportCompletion as stated in the issue and its associated class member g_pPluginContext, which is now unused as well.

The best reviewer is probably @mirichmo , who raised the initial issue with very helpful descriptions or @dantraMSFT who is currently assigned to the issue.
  • Loading branch information
bergmeister authored and TravisEz13 committed Nov 29, 2017
1 parent 5650ce2 commit 724095e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ WSManPluginSend
WSManPluginSignal
WSManPluginReceive
WSManPluginConnect
PerformWSManPluginReportCompletion
15 changes: 0 additions & 15 deletions src/powershell-native/nativemsh/pwrshplugin/pwrshplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -1090,13 +1085,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);
}

0 comments on commit 724095e

Please sign in to comment.