> For the complete documentation index, see [llms.txt](https://www.pinvoke.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pinvoke.dev/amsi/amsiscanbuffer.md).

# AmsiScanBuffer

```csharp
[DllImport("Amsi.dll", ExactSpelling = true)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
public static extern unsafe HRESULT AmsiScanBuffer(
    HAMSICONTEXT amsiContext,
    void* buffer,
    uint length,
    PCWSTR contentName,
    HAMSISESSION amsiSession,
    AMSI_RESULT* result);
```

[HAMSICONTEXT](/antimalware/hamsicontext.md)

[HAMSISESSION](/antimalware/hamsisession.md)

[AMSI\_RESULT](/antimalware/amsiresult.md)
