/// <summary>Initializes a new instance of the <see cref="SafeHAMSISESSION"/> class.</summary> /// <param name="appName">The name, version, or GUID string of the app calling the AMSI API.</param> public SafeHAMSISESSION(string appName) : base() { AmsiInitialize(appName, out SafeHAMSICONTEXT hc).ThrowIfFailed(); Open(ctx = hc); }
public static extern HRESULT AmsiInitialize([MarshalAs(UnmanagedType.LPWStr)] string appName, out SafeHAMSICONTEXT amsiContext);