csharp/tyranid/WindowsRpcClients/Win10_1809/brokerlib.dll/d09bdeb5-6171-4a34-bfe2-06fa82652568_1.0.cs

d09bdeb5-6171-4a34-bfe2-06fa82652568_1.0.cs
//------------------------------------------------------------------------------
// 
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// 
//------------------------------------------------------------------------------

// Source Executable: c:\windows\system32\BrokerLib.dll
// Interface ID: d09bdeb5-6171-4a34-bfe2-06fa82652568
// Interface Version: 1.0



namespace rpc_d09bdeb5_6171_4a34_bfe2_06fa82652568_1_0
{
    
    #region Marshal Helpers
    internal clast _Marshal_Helper : NtApiDotNet.Ndr.Marshal.NdrMarshalBuffer
    {
        public void Write_0(Struct_0 p0)
        {
            WriteStruct(p0);
        }
        public void Write_1(Struct_1 p0)
        {
            WriteStruct(p0);
        }
        public void Write_2(Struct_2 p0)
        {
            WriteStruct(p0);
        }
        public void Write_3(Union_3 p0, long p1)
        {
            WriteUnion(p0, p1);
        }
        public void Write_4(Struct_4 p0)
        {
            WriteStruct(p0);
        }
        public void Write_5(Struct_5 p0)
        {
            WriteStruct(p0);
        }
        public void Write_6(Struct_7 p0)
        {
            WriteStruct(p0);
        }
        public void Write_7(Struct_8 p0)
        {
            WriteStruct(p0);
        }
        public void Write_8(sbyte[] p0, long p1)
        {
            WriteConformantArray(p0, p1);
        }
        public void Write_9(Struct_2[] p0, long p1)
        {
            WriteConformantStructArray(p0, p1);
        }
        public void Write_10(string p0, long p1)
        {
            WriteConformantVaryingString(p0, p1);
        }
        public void Write_11(string p0, long p1)
        {
            WriteConformantVaryingString(p0, p1);
        }
        public void Write_12(char[] p0, long p1)
        {
            WriteConformantArray(p0, p1);
        }
        public void Write_13(sbyte[] p0, long p1)
        {
            WriteConformantArray(p0, p1);
        }
        public void Write_14(int[] p0)
        {
            WriteFixedPrimitiveArray(p0, 2);
        }
        public void Write_15(sbyte[] p0, long p1)
        {
            WriteConformantArray(p0, p1);
        }
    }
    internal clast _Unmarshal_Helper : NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer
    {
        public _Unmarshal_Helper(NtApiDotNet.Win32.Rpc.RpcClientResponse r) : 
                base(r.NdrBuffer, r.Handles, r.DataRepresentation)
        {
        }
        public _Unmarshal_Helper(byte[] ba) : 
                base(ba)
        {
        }
        public Struct_0 Read_0()
        {
            return ReadStruct();
        }
        public Struct_1 Read_1()
        {
            return ReadStruct();
        }
        public Struct_2 Read_2()
        {
            return ReadStruct();
        }
        public Union_3 Read_3()
        {
            return ReadStruct();
        }
        public Struct_4 Read_4()
        {
            return ReadStruct();
        }
        public Struct_5 Read_5()
        {
            return ReadStruct();
        }
        public Struct_7 Read_6()
        {
            return ReadStruct();
        }
        public Struct_8 Read_7()
        {
            return ReadStruct();
        }
        public sbyte[] Read_8()
        {
            return ReadConformantArray();
        }
        public Struct_2[] Read_9()
        {
            return ReadConformantStructArray();
        }
        public char[] Read_10()
        {
            return ReadConformantArray();
        }
        public sbyte[] Read_11()
        {
            return ReadConformantArray();
        }
        public int[] Read_12()
        {
            return ReadFixedPrimitiveArray(2);
        }
        public sbyte[] Read_13()
        {
            return ReadConformantArray();
        }
    }
    #endregion
    #region Complex Types
    public struct Struct_0 : NtApiDotNet.Ndr.Marshal.INdrStructure
    {
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Marshal(NtApiDotNet.Ndr.Marshal.NdrMarshalBuffer m)
        {
            Marshal(((_Marshal_Helper)(m)));
        }
        private void Marshal(_Marshal_Helper m)
        {
            m.WriteInt32(Member0);
            m.WriteEmbeddedPointer(Member8, new System.Action(m.Write_8), Member0);
        }
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Unmarshal(NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer u)
        {
            Unmarshal(((_Unmarshal_Helper)(u)));
        }
        private void Unmarshal(_Unmarshal_Helper u)
        {
            Member0 = u.ReadInt32();
            Member8 = u.ReadEmbeddedPointer(new System.Func(u.Read_8), false);
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public int Member0;
        public NtApiDotNet.Ndr.Marshal.NdrEmbeddedPointer Member8;
        public static Struct_0 CreateDefault()
        {
            return new Struct_0();
        }
        public Struct_0(int Member0, sbyte[] Member8)
        {
            this.Member0 = Member0;
            this.Member8 = Member8;
        }
    }
    public struct Struct_1 : NtApiDotNet.Ndr.Marshal.INdrStructure
    {
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Marshal(NtApiDotNet.Ndr.Marshal.NdrMarshalBuffer m)
        {
            Marshal(((_Marshal_Helper)(m)));
        }
        private void Marshal(_Marshal_Helper m)
        {
            m.WriteInt16(Member0);
            m.WriteEmbeddedPointer(Member8, new System.Action(m.Write_9), Member0);
        }
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Unmarshal(NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer u)
        {
            Unmarshal(((_Unmarshal_Helper)(u)));
        }
        private void Unmarshal(_Unmarshal_Helper u)
        {
            Member0 = u.ReadInt16();
            Member8 = u.ReadEmbeddedPointer(new System.Func(u.Read_9), false);
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public short Member0;
        public NtApiDotNet.Ndr.Marshal.NdrEmbeddedPointer Member8;
        public static Struct_1 CreateDefault()
        {
            return new Struct_1();
        }
        public Struct_1(short Member0, Struct_2[] Member8)
        {
            this.Member0 = Member0;
            this.Member8 = Member8;
        }
    }
    public struct Struct_2 : NtApiDotNet.Ndr.Marshal.INdrStructure
    {
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Marshal(NtApiDotNet.Ndr.Marshal.NdrMarshalBuffer m)
        {
            Marshal(((_Marshal_Helper)(m)));
        }
        private void Marshal(_Marshal_Helper m)
        {
            m.WriteEmbeddedPointer(Member0, new System.Action(m.Write_10), 65);
            m.WriteEnum16(Member8);
            m.Write_3(Member10, Member8);
        }
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Unmarshal(NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer u)
        {
            Unmarshal(((_Unmarshal_Helper)(u)));
        }
        private void Unmarshal(_Unmarshal_Helper u)
        {
            Member0 = u.ReadEmbeddedPointer(new System.Func(u.ReadConformantVaryingString), false);
            Member8 = u.ReadEnum16();
            Member10 = u.Read_3();
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 8;
        }
        public NtApiDotNet.Ndr.Marshal.NdrEmbeddedPointer Member0;
        public NtApiDotNet.Ndr.Marshal.NdrEnum16 Member8;
        public Union_3 Member10;
        public static Struct_2 CreateDefault()
        {
            return new Struct_2();
        }
        public Struct_2(string Member0, NtApiDotNet.Ndr.Marshal.NdrEnum16 Member8, Union_3 Member10)
        {
            this.Member0 = Member0;
            this.Member8 = Member8;
            this.Member10 = Member10;
        }
    }
    public struct Union_3 : NtApiDotNet.Ndr.Marshal.INdrNonEncapsulatedUnion
    {
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Marshal(NtApiDotNet.Ndr.Marshal.NdrMarshalBuffer m)
        {
            throw new System.NotImplementedException();
        }
        void NtApiDotNet.Ndr.Marshal.INdrNonEncapsulatedUnion.Marshal(NtApiDotNet.Ndr.Marshal.NdrMarshalBuffer m, long l)
        {
            Selector = ((NtApiDotNet.Ndr.Marshal.NdrEnum16)(l));
            Marshal(((_Marshal_Helper)(m)));
        }
        private void Marshal(_Marshal_Helper m)
        {
            m.WriteEnum16(Selector);
            if ((Selector == 0))
            {
                m.WriteInt32(Arm_0);
                goto done;
            }
            if ((Selector == 1))
            {
                m.WriteInt64(Arm_1);
                goto done;
            }
            if ((Selector == 2))
            {
                m.WriteEmbeddedPointer(Arm_2, new System.Action(m.Write_11), 2049);
                goto done;
            }
            if ((Selector == 3))
            {
                m.Write_4(Arm_3);
                goto done;
            }
            if ((Selector == 4))
            {
                m.Write_5(Arm_4);
                goto done;
            }
            throw new System.ArgumentException("No matching union selector when marshaling Union_3");
        done:
            return;
        }
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Unmarshal(NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer u)
        {
            Unmarshal(((_Unmarshal_Helper)(u)));
        }
        private void Unmarshal(_Unmarshal_Helper u)
        {
            Selector = u.ReadEnum16();
            if ((Selector == 0))
            {
                Arm_0 = u.ReadInt32();
                goto done;
            }
            if ((Selector == 1))
            {
                Arm_1 = u.ReadInt64();
                goto done;
            }
            if ((Selector == 2))
            {
                Arm_2 = u.ReadEmbeddedPointer(new System.Func(u.ReadConformantVaryingString), false);
                goto done;
            }
            if ((Selector == 3))
            {
                Arm_3 = u.Read_4();
                goto done;
            }
            if ((Selector == 4))
            {
                Arm_4 = u.Read_5();
                goto done;
            }
            throw new System.ArgumentException("No matching union selector when marshaling Union_3");
        done:
            return;
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 8;
        }
        private NtApiDotNet.Ndr.Marshal.NdrEnum16 Selector;
        public int Arm_0;
        public long Arm_1;
        public NtApiDotNet.Ndr.Marshal.NdrEmbeddedPointer Arm_2;
        public Struct_4 Arm_3;
        public Struct_5 Arm_4;
        public static Union_3 CreateDefault()
        {
            return new Union_3();
        }
        public Union_3(NtApiDotNet.Ndr.Marshal.NdrEnum16 Selector, int Arm_0, long Arm_1, string Arm_2, Struct_4 Arm_3, Struct_5 Arm_4)
        {
            this.Selector = Selector;
            this.Arm_0 = Arm_0;
            this.Arm_1 = Arm_1;
            this.Arm_2 = Arm_2;
            this.Arm_3 = Arm_3;
            this.Arm_4 = Arm_4;
        }
    }
    public struct Struct_4 : NtApiDotNet.Ndr.Marshal.INdrStructure
    {
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Marshal(NtApiDotNet.Ndr.Marshal.NdrMarshalBuffer m)
        {
            Marshal(((_Marshal_Helper)(m)));
        }
        private void Marshal(_Marshal_Helper m)
        {
            m.WriteInt16(Member0);
            m.WriteEmbeddedPointer(Member8, new System.Action(m.Write_12), Member0);
        }
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Unmarshal(NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer u)
        {
            Unmarshal(((_Unmarshal_Helper)(u)));
        }
        private void Unmarshal(_Unmarshal_Helper u)
        {
            Member0 = u.ReadInt16();
            Member8 = u.ReadEmbeddedPointer(new System.Func(u.Read_10), false);
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public short Member0;
        public NtApiDotNet.Ndr.Marshal.NdrEmbeddedPointer Member8;
        public static Struct_4 CreateDefault()
        {
            return new Struct_4();
        }
        public Struct_4(short Member0, char[] Member8)
        {
            this.Member0 = Member0;
            this.Member8 = Member8;
        }
    }
    public struct Struct_5 : NtApiDotNet.Ndr.Marshal.INdrStructure
    {
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Marshal(NtApiDotNet.Ndr.Marshal.NdrMarshalBuffer m)
        {
            Marshal(((_Marshal_Helper)(m)));
        }
        private void Marshal(_Marshal_Helper m)
        {
            m.WriteInt16(Member0);
            m.WriteEmbeddedPointer(Member8, new System.Action(m.Write_13), Member0);
        }
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Unmarshal(NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer u)
        {
            Unmarshal(((_Unmarshal_Helper)(u)));
        }
        private void Unmarshal(_Unmarshal_Helper u)
        {
            Member0 = u.ReadInt16();
            Member8 = u.ReadEmbeddedPointer(new System.Func(u.Read_11), false);
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public short Member0;
        public NtApiDotNet.Ndr.Marshal.NdrEmbeddedPointer Member8;
        public static Struct_5 CreateDefault()
        {
            return new Struct_5();
        }
        public Struct_5(short Member0, sbyte[] Member8)
        {
            this.Member0 = Member0;
            this.Member8 = Member8;
        }
    }
    public struct Struct_7 : NtApiDotNet.Ndr.Marshal.INdrStructure
    {
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Marshal(NtApiDotNet.Ndr.Marshal.NdrMarshalBuffer m)
        {
            Marshal(((_Marshal_Helper)(m)));
        }
        private void Marshal(_Marshal_Helper m)
        {
            m.Write_14(NtApiDotNet.Win32.Rpc.RpcUtils.CheckNull(Member0, "Member0"));
        }
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Unmarshal(NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer u)
        {
            Unmarshal(((_Unmarshal_Helper)(u)));
        }
        private void Unmarshal(_Unmarshal_Helper u)
        {
            Member0 = u.Read_12();
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public int[] Member0;
        public static Struct_7 CreateDefault()
        {
            Struct_7 ret = new Struct_7();
            ret.Member0 = new int[2];
            return ret;
        }
        public Struct_7(int[] Member0)
        {
            this.Member0 = Member0;
        }
    }
    public struct Struct_8 : NtApiDotNet.Ndr.Marshal.INdrStructure
    {
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Marshal(NtApiDotNet.Ndr.Marshal.NdrMarshalBuffer m)
        {
            Marshal(((_Marshal_Helper)(m)));
        }
        private void Marshal(_Marshal_Helper m)
        {
            m.WriteInt32(Member0);
            m.WriteInt32(Member4);
            m.WriteInt32(Member8);
            m.WriteInt32(MemberC);
            m.WriteInt32(Member10);
            m.WriteInt32(Member14);
            m.WriteInt32(Member18);
            m.WriteSByte(Member1C);
        }
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Unmarshal(NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer u)
        {
            Unmarshal(((_Unmarshal_Helper)(u)));
        }
        private void Unmarshal(_Unmarshal_Helper u)
        {
            Member0 = u.ReadInt32();
            Member4 = u.ReadInt32();
            Member8 = u.ReadInt32();
            MemberC = u.ReadInt32();
            Member10 = u.ReadInt32();
            Member14 = u.ReadInt32();
            Member18 = u.ReadInt32();
            Member1C = u.ReadSByte();
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public int Member0;
        public int Member4;
        public int Member8;
        public int MemberC;
        public int Member10;
        public int Member14;
        public int Member18;
        public sbyte Member1C;
        public static Struct_8 CreateDefault()
        {
            return new Struct_8();
        }
        public Struct_8(int Member0, int Member4, int Member8, int MemberC, int Member10, int Member14, int Member18, sbyte Member1C)
        {
            this.Member0 = Member0;
            this.Member4 = Member4;
            this.Member8 = Member8;
            this.MemberC = MemberC;
            this.Member10 = Member10;
            this.Member14 = Member14;
            this.Member18 = Member18;
            this.Member1C = Member1C;
        }
    }
    #endregion
    #region Client Implementation
    public sealed clast Client : NtApiDotNet.Win32.Rpc.RpcClientBase
    {
        public Client() : 
                base("d09bdeb5-6171-4a34-bfe2-06fa82652568", 1, 0)
        {
        }
        private _Unmarshal_Helper SendReceive(int p, _Marshal_Helper m)
        {
            return new _Unmarshal_Helper(SendReceive(p, m.DataRepresentation, m.ToArray(), m.Handles));
        }
        public uint _BriCreateEvent(NtApiDotNet.Ndr.Marshal.NdrEnum16 p0, string p1, Struct_0 p2, Struct_1 p3, int p4, System.Nullable p5, out Struct_7 p6, out Struct_8 p7, out NtApiDotNet.Ndr.Marshal.NdrContextHandle p8, ref System.Nullable p9)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteEnum16(p0);
            m.WriteReferent(p1, new System.Action(m.WriteTerminatedString));
            m.Write_0(p2);
            m.Write_1(p3);
            m.WriteInt32(p4);
            m.WriteReferent(p5, new System.Action(m.WriteGuid));
            m.WriteReferent(p9, new System.Action(m.Write_6));
            _Unmarshal_Helper u = SendReceive(0, m);
            p6 = u.Read_6();
            p7 = u.Read_7();
            p8 = u.ReadContextHandle();
            p9 = u.ReadReferentValue(new System.Func(u.Read_6), false);
            return u.ReadUInt32();
        }
        public uint _BriDeleteEvent(NtApiDotNet.Ndr.Marshal.NdrEnum16 p0, ref NtApiDotNet.Ndr.Marshal.NdrContextHandle p1)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteEnum16(p0);
            m.WriteContextHandle(p1);
            _Unmarshal_Helper u = SendReceive(1, m);
            p1 = u.ReadContextHandle();
            return u.ReadUInt32();
        }
        public uint BriDisableEvent(NtApiDotNet.Ndr.Marshal.NdrEnum16 p0, NtApiDotNet.Ndr.Marshal.NdrContextHandle p1)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteEnum16(p0);
            m.WriteContextHandle(p1);
            _Unmarshal_Helper u = SendReceive(2, m);
            return u.ReadUInt32();
        }
        public uint BriEnableEvent(NtApiDotNet.Ndr.Marshal.NdrEnum16 p0, NtApiDotNet.Ndr.Marshal.NdrContextHandle p1)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteEnum16(p0);
            m.WriteContextHandle(p1);
            _Unmarshal_Helper u = SendReceive(3, m);
            return u.ReadUInt32();
        }
        public uint BriSignalEvent(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, int p1, sbyte p2, System.Guid p3, int p4, sbyte[] p5)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.WriteInt32(p1);
            m.WriteSByte(p2);
            m.WriteGuid(p3);
            m.WriteInt32(p4);
            m.Write_15(NtApiDotNet.Win32.Rpc.RpcUtils.CheckNull(p5, "p5"), p4);
            _Unmarshal_Helper u = SendReceive(4, m);
            return u.ReadUInt32();
        }
    }
    #endregion
}