Share via


PowerShellUnsafeAssemblyLoad.LoadAssemblyFromNativeMemory Method

Definition

Load an assembly in memory from unmanaged code.

[System.Runtime.InteropServices.UnmanagedCallersOnly]
public static int LoadAssemblyFromNativeMemory (IntPtr data, int size);
[<System.Runtime.InteropServices.UnmanagedCallersOnly>]
static member LoadAssemblyFromNativeMemory : nativeint * int -> int
Public Shared Function LoadAssemblyFromNativeMemory (data As IntPtr, size As Integer) As Integer

Parameters

data
IntPtr

nativeint

Unmanaged pointer to assembly data buffer.

size
Int32

Size in bytes of the assembly data buffer.

Returns

Returns zero on success and non-zero on failure.

Attributes

Remarks

This API is covered by the experimental feature 'PSLoadAssemblyFromNativeCode', and it may be deprecated and removed in future.

Applies to