csharp/tyranid/WindowsRpcClients/Win10_1809/ias.dll/7d814569-35b3-4850-bb32-83035fcebf6e_1.0.cs

7d814569-35b3-4850-bb32-83035fcebf6e_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\ias.dll
// Interface ID: 7d814569-35b3-4850-bb32-83035fcebf6e
// Interface Version: 1.0



namespace rpc_7d814569_35b3_4850_bb32_83035fcebf6e_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_6 p0)
        {
            WriteStruct(p0);
        }
        public void Write_7(Struct_7 p0)
        {
            WriteStruct(p0);
        }
        public void Write_8(Struct_8 p0)
        {
            WriteStruct(p0);
        }
        public void Write_9(Struct_1[] p0, long p1)
        {
            WriteConformantStructArray(p0, p1);
        }
        public void Write_10(sbyte[] p0)
        {
            WriteFixedPrimitiveArray(p0, 6);
        }
        public void Write_11(sbyte[] p0)
        {
            WriteFixedPrimitiveArray(p0, 112);
        }
        public void Write_12(byte[] 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_6 Read_6()
        {
            return ReadStruct();
        }
        public Struct_7 Read_7()
        {
            return ReadStruct();
        }
        public Struct_8 Read_8()
        {
            return ReadStruct();
        }
        public Struct_1[] Read_9()
        {
            return ReadConformantStructArray();
        }
        public sbyte[] Read_10()
        {
            return ReadFixedPrimitiveArray(6);
        }
        public sbyte[] Read_11()
        {
            return ReadFixedPrimitiveArray(112);
        }
        public byte[] Read_12()
        {
            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_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.ReadInt32();
            Member8 = u.ReadEmbeddedPointer(new System.Func(u.Read_9), 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, Struct_1[] 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.WriteInt32(Member0);
            m.WriteInt32(Member4);
            m.WriteInt32(Member8);
            m.Write_2(Member10);
        }
        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();
            Member10 = u.Read_2();
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public int Member0;
        public int Member4;
        public int Member8;
        public Struct_2 Member10;
        public static Struct_1 CreateDefault()
        {
            return new Struct_1();
        }
        public Struct_1(int Member0, int Member4, int Member8, Struct_2 Member10)
        {
            this.Member0 = Member0;
            this.Member4 = Member4;
            this.Member8 = Member8;
            this.Member10 = Member10;
        }
    }
    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.WriteEnum16(Member0);
            m.Write_3(Member8, ((uint)(Member0)));
        }
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Unmarshal(NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer u)
        {
            Unmarshal(((_Unmarshal_Helper)(u)));
        }
        private void Unmarshal(_Unmarshal_Helper u)
        {
            Member0 = u.ReadEnum16();
            Member8 = u.Read_3();
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public NtApiDotNet.Ndr.Marshal.NdrEnum16 Member0;
        public Union_3 Member8;
        public static Struct_2 CreateDefault()
        {
            return new Struct_2();
        }
        public Struct_2(NtApiDotNet.Ndr.Marshal.NdrEnum16 Member0, Union_3 Member8)
        {
            this.Member0 = Member0;
            this.Member8 = Member8;
        }
    }
    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 = ((uint)(l));
            Marshal(((_Marshal_Helper)(m)));
        }
        private void Marshal(_Marshal_Helper m)
        {
            m.WriteUInt32(Selector);
            if ((Selector == 1))
            {
                m.WriteInt32(Arm_1);
                goto done;
            }
            if ((Selector == 2))
            {
                m.WriteInt32(Arm_2);
                goto done;
            }
            if ((Selector == 3))
            {
                m.WriteInt32(Arm_3);
                goto done;
            }
            if ((Selector == 4))
            {
                m.Write_4(Arm_4);
                goto done;
            }
            if ((Selector == 10))
            {
                m.Write_4(Arm_10);
                goto done;
            }
            if ((Selector == 5))
            {
                m.Write_6(Arm_5);
                goto done;
            }
            if ((Selector == 6))
            {
                m.Write_7(Arm_6);
                goto done;
            }
            if ((Selector == 7))
            {
                m.Write_8(Arm_7);
                goto done;
            }
            if ((Selector == 8))
            {
                m.Write_7(Arm_8);
                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.ReadUInt32();
            if ((Selector == 1))
            {
                Arm_1 = u.ReadInt32();
                goto done;
            }
            if ((Selector == 2))
            {
                Arm_2 = u.ReadInt32();
                goto done;
            }
            if ((Selector == 3))
            {
                Arm_3 = u.ReadInt32();
                goto done;
            }
            if ((Selector == 4))
            {
                Arm_4 = u.Read_4();
                goto done;
            }
            if ((Selector == 10))
            {
                Arm_10 = u.Read_4();
                goto done;
            }
            if ((Selector == 5))
            {
                Arm_5 = u.Read_6();
                goto done;
            }
            if ((Selector == 6))
            {
                Arm_6 = u.Read_7();
                goto done;
            }
            if ((Selector == 7))
            {
                Arm_7 = u.Read_8();
                goto done;
            }
            if ((Selector == 8))
            {
                Arm_8 = u.Read_7();
                goto done;
            }
            throw new System.ArgumentException("No matching union selector when marshaling Union_3");
        done:
            return;
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 1;
        }
        private uint Selector;
        public int Arm_1;
        public int Arm_2;
        public int Arm_3;
        public Struct_4 Arm_4;
        public Struct_4 Arm_10;
        public Struct_6 Arm_5;
        public Struct_7 Arm_6;
        public Struct_8 Arm_7;
        public Struct_7 Arm_8;
        public static Union_3 CreateDefault()
        {
            return new Union_3();
        }
        public Union_3(uint Selector, int Arm_1, int Arm_2, int Arm_3, Struct_4 Arm_4, Struct_4 Arm_10, Struct_6 Arm_5, Struct_7 Arm_6, Struct_8 Arm_7, Struct_7 Arm_8)
        {
            this.Selector = Selector;
            this.Arm_1 = Arm_1;
            this.Arm_2 = Arm_2;
            this.Arm_3 = Arm_3;
            this.Arm_4 = Arm_4;
            this.Arm_10 = Arm_10;
            this.Arm_5 = Arm_5;
            this.Arm_6 = Arm_6;
            this.Arm_7 = Arm_7;
            this.Arm_8 = Arm_8;
        }
    }
    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.WriteEmbeddedPointer(Member0, new System.Action(m.Write_5));
        }
        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.Read_5), false);
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public NtApiDotNet.Ndr.Marshal.NdrEmbeddedPointer Member0;
        public static Struct_4 CreateDefault()
        {
            return new Struct_4();
        }
        public Struct_4(System.Nullable Member0)
        {
            this.Member0 = Member0;
        }
    }
    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.Write_10(NtApiDotNet.Win32.Rpc.RpcUtils.CheckNull(Member2, "Member2"));
            m.WriteInt64(Member8);
            m.Write_11(NtApiDotNet.Win32.Rpc.RpcUtils.CheckNull(Member10, "Member10"));
        }
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Unmarshal(NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer u)
        {
            Unmarshal(((_Unmarshal_Helper)(u)));
        }
        private void Unmarshal(_Unmarshal_Helper u)
        {
            Member0 = u.ReadInt16();
            Member2 = u.Read_10();
            Member8 = u.ReadInt64();
            Member10 = u.Read_11();
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 8;
        }
        public short Member0;
        public sbyte[] Member2;
        public long Member8;
        public sbyte[] Member10;
        public static Struct_5 CreateDefault()
        {
            Struct_5 ret = new Struct_5();
            ret.Member2 = new sbyte[6];
            ret.Member10 = new sbyte[112];
            return ret;
        }
        public Struct_5(short Member0, sbyte[] Member2, long Member8, sbyte[] Member10)
        {
            this.Member0 = Member0;
            this.Member2 = Member2;
            this.Member8 = Member8;
            this.Member10 = Member10;
        }
    }
    public struct Struct_6 : 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.WriteTerminatedAnsiString));
            m.WriteEmbeddedPointer(Member8, new System.Action(m.WriteTerminatedString));
        }
        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.ReadConformantVaryingAnsiString), false);
            Member8 = u.ReadEmbeddedPointer(new System.Func(u.ReadConformantVaryingString), false);
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public NtApiDotNet.Ndr.Marshal.NdrEmbeddedPointer Member0;
        public NtApiDotNet.Ndr.Marshal.NdrEmbeddedPointer Member8;
        public static Struct_6 CreateDefault()
        {
            return new Struct_6();
        }
        public Struct_6(string Member0, string 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.WriteInt32(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.ReadInt32();
            Member8 = u.ReadEmbeddedPointer(new System.Func(u.Read_12), false);
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public int Member0;
        public NtApiDotNet.Ndr.Marshal.NdrEmbeddedPointer Member8;
        public static Struct_7 CreateDefault()
        {
            return new Struct_7();
        }
        public Struct_7(int Member0, byte[] Member8)
        {
            this.Member0 = Member0;
            this.Member8 = Member8;
        }
    }
    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);
        }
        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();
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public int Member0;
        public int Member4;
        public static Struct_8 CreateDefault()
        {
            return new Struct_8();
        }
        public Struct_8(int Member0, int Member4)
        {
            this.Member0 = Member0;
            this.Member4 = Member4;
        }
    }
    #endregion
    #region Client Implementation
    public sealed clast Client : NtApiDotNet.Win32.Rpc.RpcClientBase
    {
        public Client() : 
                base("7d814569-35b3-4850-bb32-83035fcebf6e", 1, 0)
        {
        }
        private _Unmarshal_Helper SendReceive(int p, _Marshal_Helper m)
        {
            return new _Unmarshal_Helper(SendReceive(p, m.DataRepresentation, m.ToArray(), m.Handles));
        }
        public void ServerDoRequest(Struct_0 p0, out Struct_0 p1, int p2, out int p3, NtApiDotNet.Ndr.Marshal.NdrEnum16 p4, out int p5, int p6)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.Write_0(p0);
            m.WriteInt32(p2);
            m.WriteEnum16(p4);
            m.WriteInt32(p6);
            _Unmarshal_Helper u = SendReceive(0, m);
            p1 = u.Read_0();
            p3 = u.ReadInt32();
            p5 = u.ReadInt32();
        }
        // async
        public void ServerDoRequestAsync(Struct_0 p0, out Struct_0 p1, int p2, out int p3, NtApiDotNet.Ndr.Marshal.NdrEnum16 p4, out int p5, int p6)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.Write_0(p0);
            m.WriteInt32(p2);
            m.WriteEnum16(p4);
            m.WriteInt32(p6);
            _Unmarshal_Helper u = SendReceive(1, m);
            p1 = u.Read_0();
            p3 = u.ReadInt32();
            p5 = u.ReadInt32();
        }
        public void ServerConfigureIas()
        {
            _Marshal_Helper m = new _Marshal_Helper();
            _Unmarshal_Helper u = SendReceive(2, m);
        }
    }
    #endregion
}