Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1652,24 +1652,28 @@ internal enum AMSI_RESULT
/// Return Type: HRESULT->LONG->int
///appName: LPCWSTR->WCHAR*
///amsiContext: HAMSICONTEXT*
[DefaultDllImportSearchPathsAttribute(DllImportSearchPath.System32)]
[DllImportAttribute("amsi.dll", EntryPoint = "AmsiInitialize", CallingConvention = CallingConvention.StdCall)]
internal static extern int AmsiInitialize(
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPWStr)] string appName, ref System.IntPtr amsiContext);

/// Return Type: void
///amsiContext: HAMSICONTEXT->HAMSICONTEXT__*
[DefaultDllImportSearchPathsAttribute(DllImportSearchPath.System32)]
[DllImportAttribute("amsi.dll", EntryPoint = "AmsiUninitialize", CallingConvention = CallingConvention.StdCall)]
internal static extern void AmsiUninitialize(System.IntPtr amsiContext);

/// Return Type: HRESULT->LONG->int
///amsiContext: HAMSICONTEXT->HAMSICONTEXT__*
///amsiSession: HAMSISESSION*
[DefaultDllImportSearchPathsAttribute(DllImportSearchPath.System32)]
[DllImportAttribute("amsi.dll", EntryPoint = "AmsiOpenSession", CallingConvention = CallingConvention.StdCall)]
internal static extern int AmsiOpenSession(System.IntPtr amsiContext, ref System.IntPtr amsiSession);

/// Return Type: void
///amsiContext: HAMSICONTEXT->HAMSICONTEXT__*
///amsiSession: HAMSISESSION->HAMSISESSION__*
[DefaultDllImportSearchPathsAttribute(DllImportSearchPath.System32)]
[DllImportAttribute("amsi.dll", EntryPoint = "AmsiCloseSession", CallingConvention = CallingConvention.StdCall)]
internal static extern void AmsiCloseSession(System.IntPtr amsiContext, System.IntPtr amsiSession);

Expand All @@ -1680,6 +1684,7 @@ internal static extern int AmsiInitialize(
///contentName: LPCWSTR->WCHAR*
///amsiSession: HAMSISESSION->HAMSISESSION__*
///result: AMSI_RESULT*
[DefaultDllImportSearchPathsAttribute(DllImportSearchPath.System32)]
[DllImportAttribute("amsi.dll", EntryPoint = "AmsiScanBuffer", CallingConvention = CallingConvention.StdCall)]
internal static extern int AmsiScanBuffer(
System.IntPtr amsiContext, System.IntPtr buffer, uint length,
Expand All @@ -1691,6 +1696,7 @@ internal static extern int AmsiScanBuffer(
///contentName: LPCWSTR->WCHAR*
///amsiSession: HAMSISESSION->HAMSISESSION__*
///result: AMSI_RESULT*
[DefaultDllImportSearchPathsAttribute(DllImportSearchPath.System32)]
[DllImportAttribute("amsi.dll", EntryPoint = "AmsiScanString", CallingConvention = CallingConvention.StdCall)]
internal static extern int AmsiScanString(
System.IntPtr amsiContext, [InAttribute()] [MarshalAsAttribute(UnmanagedType.LPWStr)] string @string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ internal class WldpNativeMethods
/// pHostInformation: PWLDP_HOST_INFORMATION->_WLDP_HOST_INFORMATION*
/// pdwLockdownState: PDWORD->DWORD*
/// dwFlags: DWORD->unsigned int
[DefaultDllImportSearchPathsAttribute(DllImportSearchPath.System32)]
[DllImportAttribute("wldp.dll", EntryPoint = "WldpGetLockdownPolicy")]
internal static extern int WldpGetLockdownPolicy(ref WLDP_HOST_INFORMATION pHostInformation, ref uint pdwLockdownState, uint dwFlags);

Expand All @@ -572,6 +573,7 @@ internal class WldpNativeMethods
/// pHostInformation: PWLDP_HOST_INFORMATION->_WLDP_HOST_INFORMATION*
/// ptIsApproved: PBOOL->BOOL*
/// dwFlags: DWORD->unsigned int
[DefaultDllImportSearchPathsAttribute(DllImportSearchPath.System32)]
[DllImportAttribute("wldp.dll", EntryPoint = "WldpIsClassInApprovedList")]
internal static extern int WldpIsClassInApprovedList(ref Guid rclsid, ref WLDP_HOST_INFORMATION pHostInformation, ref int ptIsApproved, uint dwFlags);

Expand Down