Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
            }
        }