Hi @Jeremiah DiPilato ,
Based on the published documentation, neither the Defender client API nor the documented Defender event log provides the guarantees you are looking for. What the documentation does give you is threat-level information for a scan. It does not give you a per-file inspection receipt.
The MpScanStart reference says the returned handle can be used to retrieve a scan result, and the documented way to do that is MpThreatOpen function (MpClient.h) - Win32 apps | Microsoft Learn with MPTHREAT_SOURCE_SCAN, which enumerates the threats associated with a specific scan handle. The reference describes that handle as a handle to a completed scan operation, so the documentation does not say whether this works for a scan that was aborted. Each entry returned by MpThreatEnumerate is an MPTHREAT_INFO structure (MpClient.h) - Win32 apps | Microsoft Learn structure. Its ThreatStatus member reports states such as detected, cleaned, or quarantined, its ResourceList member lists the resources identified with the threat, and RemediationResourceList lists the resources that failed during remediation. Those resources are MPRESOURCE_INFO entries, which identify files by path, so even when Defender did act on a file, the result is not tied to a particular revision of it. If the first call to MpThreatEnumerate returns S_FALSE, the enumeration is simply empty, and I could not find any statement that this means the file was fully inspected and found clean rather than skipped, excluded, served from cache, or partially inspected.
The documented events do not close that gap either. In the Microsoft Defender Antivirus event IDs and error codes - Microsoft Defender for Endpoint | Microsoft Learn reference, scan events such as 1000 describe the scan ID, type, parameters, and scanned resources. Detection events such as 1116 describe the threat, the file path, the detection source, and the signature and engine versions. The event log does include content hashes in limited cases, for example event 1120, which records hashes for a threat resource, but the reference says it is logged only when the ThreatFileHashLogging policy is set, and it applies to threat resources rather than to a file that was found clean. I could not find a documented field in these events that records a per-file inspection outcome, and I could not find documentation stating that the scan ID in these events corresponds to any value obtained from an MpScanStart handle.
On settlement, the MpScanControl reference describes control only for asynchronous scans, since its handle parameter is defined as a handle to an asynchronous scan operation. For a synchronous scan, the documentation only says that MpScanStart returns after the scan is finished. It does not describe that return as a point after which no callbacks can run or after which the file has been released.
To answer your last question directly, the published documentation does not establish any revision identity for the bytes that were inspected. It does not provide a per-file inspection disposition through the API or the event log, and it does not define a terminal state that guarantees no further callbacks after synchronous return or after an abort on an asynchronous scan. I also could not find any statement that the provider has released the file at a given point, any deadline for a scan to be accepted and started, or any settlement rule that applies when the calling process or the Defender service terminates. Behavior observed beyond that on a particular build would be an implementation detail rather than a supported contract.
I hope the references above help clarify what the public documentation does and does not commit to, and make it easier to decide how to approach the remaining points in your design. If you feel the information has helped you move forward, you are welcome to follow this guide when convenient, as it can help others with the same question find it more easily. If you later come across additional documentation on any of these points, you are always welcome to share it here as well.
Thank you.