Split into HostContextGuard/GuestContextGuard

This commit is contained in:
2025-10-05 14:32:06 -06:00
parent cd7baffc5e
commit 0bc80b6618
46 changed files with 693 additions and 623 deletions

View File

@@ -32,7 +32,7 @@ bool fillWithSystemRandom(PUCHAR buffer, size_t length) {
namespace bcrypt {
NTSTATUS WIN_FUNC BCryptGenRandom(BCRYPT_ALG_HANDLE hAlgorithm, PUCHAR pbBuffer, ULONG cbBuffer, ULONG dwFlags) {
WIN_API_SEGMENT_GUARD();
HOST_CONTEXT_GUARD();
DEBUG_LOG("BCryptGenRandom(%p, %p, %lu, %lu)\n", hAlgorithm, pbBuffer, cbBuffer, dwFlags);
if (pbBuffer == nullptr && cbBuffer != 0)
return STATUS_INVALID_HANDLE;