public static NtStatus SetDynamicCodeTrust(SafeKernelObjectHandle handle) { SystemCodeIntegrityVerificationInformation info = new SystemCodeIntegrityVerificationInformation() { FileHandle = handle.DangerousGetHandle() }; return(Set(SystemInformationClass.SystemCodeIntegrityVerificationInformation, info, false)); }
public static NtStatus QueryDynamicCodeTrust(SafeKernelObjectHandle handle, IntPtr image, int image_size) { SystemCodeIntegrityVerificationInformation info = new SystemCodeIntegrityVerificationInformation() { FileHandle = handle.DangerousGetHandle(), Image = image, ImageSize = image_size }; return(Query(SystemInformationClass.SystemCodeIntegrityVerificationInformation, info, false).Status); }