Beispiel #1
0
    public static void StructWithDefaultNonBlittableFields_DoesNotMarshal()
    {
        short s = 42;
        bool  b = true;

        Assert.True(DisabledRuntimeMarshallingNative.GetStructWithShortAndBoolCallback()(new StructWithShortAndBool(s, b), s, b));
    }
Beispiel #2
0
    public static void StructWithDefaultNonBlittableFields()
    {
        short s = 42;
        bool  b = true;

        var callback = Marshal.GetDelegateForFunctionPointer <CheckStructWithShortAndBoolCallback>((IntPtr)DisabledRuntimeMarshallingNative.GetStructWithShortAndBoolCallback());

        Assert.False(callback(new StructWithShortAndBool(s, b), s, b));
    }