Merge pull request #1597 from PowerShell/mirichmo/fixing-reverse-pinvoke
Fixing reverse PInvoke worker callback pointer structure layout to sy…
This commit is contained in:
commit
38143711f9
|
@ -360,7 +360,7 @@ namespace System.Management.Automation.Remoting
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Structure definition to match the native one.
|
/// Structure definition to match the native one.
|
||||||
/// NOTE: The layout of this structure must be IDENTICAL between here and WSManPluginEntryDelegates in pwrshplugin.h!
|
/// NOTE: The layout of this structure must be IDENTICAL between here and PwrshPluginWkr_Ptrs in pwrshplugindefs.h!
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal class WSManPluginEntryDelegatesInternal
|
internal class WSManPluginEntryDelegatesInternal
|
||||||
|
|
|
@ -115,6 +115,9 @@ typedef void (WINAPI *WSManPluginSignalFuncPtr)(
|
||||||
__in_opt PVOID commandContext,
|
__in_opt PVOID commandContext,
|
||||||
__in PCWSTR code);
|
__in PCWSTR code);
|
||||||
|
|
||||||
|
typedef void (WINAPI *WSManPluginOperationShutdownFuncPtr)(
|
||||||
|
__in PVOID pluginContext);
|
||||||
|
|
||||||
typedef struct _PwrshPluginWkr_Ptrs
|
typedef struct _PwrshPluginWkr_Ptrs
|
||||||
{
|
{
|
||||||
ShutdownPluginFuncPtr shutdownPluginFuncPtr;
|
ShutdownPluginFuncPtr shutdownPluginFuncPtr;
|
||||||
|
@ -126,6 +129,7 @@ typedef struct _PwrshPluginWkr_Ptrs
|
||||||
WSManPluginReceiveFuncPtr wsManPluginReceiveFuncPtr;
|
WSManPluginReceiveFuncPtr wsManPluginReceiveFuncPtr;
|
||||||
WSManPluginSignalFuncPtr wsManPluginSignalFuncPtr;
|
WSManPluginSignalFuncPtr wsManPluginSignalFuncPtr;
|
||||||
WSManPluginConnectFuncPtr wsManPluginConnectFuncPtr;
|
WSManPluginConnectFuncPtr wsManPluginConnectFuncPtr;
|
||||||
|
WSManPluginOperationShutdownFuncPtr wsmanPluingOperationShutdownFuncPtr; // This ptr is not used in this environment, but is required to keep the memory layout identical between unmanaged and managed code.
|
||||||
} PwrshPluginWkr_Ptrs;
|
} PwrshPluginWkr_Ptrs;
|
||||||
|
|
||||||
class PlugInException
|
class PlugInException
|
||||||
|
|
Loading…
Reference in a new issue