Conversation
The hotpatch report structures and the RuntimeReportTypeHotpatch enum value now ship in the Windows SDK, so the sample no longer declares them itself. - Reference the SDK as a NuGet package, so no SDK installation is needed - Drop the local hotpatch structure definitions and use the SDK's - Link onecore.lib instead of mincore.lib - Link the CRT statically so the executable needs no redistributable - Report malformed packages through the exit code, and check the package size and report extents while walking the envelope - Fail with an accurate message when a rejected buffer comes back without a larger required size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Windows SDK now ships everything this sample needs, so it no longer has to
carry its own copies of the hotpatch definitions.
What changed
Windows SDK 10.0.29648, via NuGet. The SDK is not available as a standalone
installer yet, so the project references
Microsoft.Windows.SDK.CPP(plus the.x64and.arm64library packages) insrc/packages.config. A NuGetrestore pulls them in, so building no longer requires a Windows SDK
installation at all.
No more locally declared structures.
HOTPATCH_RUNTIME_REPORT,HOTPATCH_INFO_ENTRY,HOTPATCH_REPORT_NAME_MAX_LENGTHand the hand-rolledRUNTIME_REPORT_TYPE_HOTPATCHvalue are gone fromHotpatchReport.h. Thesample now uses the SDK's definitions and the real
RuntimeReportTypeHotpatchenum value. Every report structure it touches now comes from
winnt.h.onecore.lib instead of mincore.lib.
onecore.libis the current umbrellalibrary, and in this SDK it resolves
GetRuntimeAttestationReportthrough theapi-ms-win-core-sysinfo-l1-2-8API set, which the loader maps tokernelbase.dll.Static CRT. The project now links the C runtime statically, so the
executable is a single self-contained file that runs on a clean machine with no
Visual C++ Redistributable installed. Its only imports are
kernel32.dll,bcrypt.dll, and the API set above, all of which ship with Windows.Docs
README and BUILDING.md are updated for the NuGet SDK, the restore step, the new
linkage, and the static runtime.
packages/is gitignored.Verification
packages/using only thedocumented
nuget restore+msbuildcommands.dumpbin /importson both binaries shows only the three Windows-suppliedDLLs, and confirms
GetRuntimeAttestationReportbinds toapi-ms-win-core-sysinfo-l1-2-8.dll.printed a complete signed package (driver report plus hotpatch report) and
exited 0, with no DLLs deployed alongside it.