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>
|
||||
/// 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>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class WSManPluginEntryDelegatesInternal
|
||||
|
|
|
@ -115,6 +115,9 @@ typedef void (WINAPI *WSManPluginSignalFuncPtr)(
|
|||
__in_opt PVOID commandContext,
|
||||
__in PCWSTR code);
|
||||
|
||||
typedef void (WINAPI *WSManPluginOperationShutdownFuncPtr)(
|
||||
__in PVOID pluginContext);
|
||||
|
||||
typedef struct _PwrshPluginWkr_Ptrs
|
||||
{
|
||||
ShutdownPluginFuncPtr shutdownPluginFuncPtr;
|
||||
|
@ -126,6 +129,7 @@ typedef struct _PwrshPluginWkr_Ptrs
|
|||
WSManPluginReceiveFuncPtr wsManPluginReceiveFuncPtr;
|
||||
WSManPluginSignalFuncPtr wsManPluginSignalFuncPtr;
|
||||
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;
|
||||
|
||||
class PlugInException
|
||||
|
|
Loading…
Reference in a new issue