public unsafe void AddressOf() { int foo = 6; int *directAddress = &foo; int *helper = (int *)Structs.AddressOf(ref foo); (directAddress == helper).Should().BeTrue("Address should be the same"); helper->Should().Be(*directAddress); }
public static unsafe void ToUpperInvariant(ref UNICODE_STRING value) { NTSTATUS status = Imports.RtlUpcaseUnicodeString( (UNICODE_STRING *)Structs.AddressOf(ref value), (UNICODE_STRING *)Structs.AddressOf(ref value), false); if (!ErrorMacros.NT_SUCCESS(status)) { ErrorMethods.GetIoExceptionForNTStatus(status); } }