//------------------------------------------------------------------------------
// <auto-generated>
//     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.
// </auto-generated>
//------------------------------------------------------------------------------

// Source Executable: c:\windows\system32\regsvc.dll
// Interface ID: 338cd001-2244-31f1-aaaa-900038001003
// Interface Version: 1.0



namespace rpc_338cd001_2244_31f1_aaaa_900038001003_1_0
{
    
    #region Marshal Helpers
    internal class _Marshal_Helper : NtApiDotNet.Ndr.Marshal.NdrMarshalBuffer
    {
        public void Write_0(Struct_0 p0)
        {
            WriteStruct<Struct_0>(p0);
        }
        public void Write_1(Struct_1 p0)
        {
            WriteStruct<Struct_1>(p0);
        }
        public void Write_2(Struct_2 p0)
        {
            WriteStruct<Struct_2>(p0);
        }
        public void Write_3(Struct_3 p0)
        {
            WriteStruct<Struct_3>(p0);
        }
        public void Write_4(Struct_4 p0)
        {
            WriteStruct<Struct_4>(p0);
        }
        public void Write_5(short[] p0, long p1, long p2)
        {
            WriteConformantVaryingArray<short>(p0, p1, p2);
        }
        public void Write_6(sbyte[] p0, long p1, long p2)
        {
            WriteConformantVaryingArray<sbyte>(p0, p1, p2);
        }
        public void Write_7(sbyte[] p0, long p1, long p2)
        {
            WriteConformantVaryingArray<sbyte>(p0, p1, p2);
        }
        public void Write_8(sbyte[] p0, long p1, long p2)
        {
            WriteConformantVaryingArray<sbyte>(p0, p1, p2);
        }
        public void Write_9(sbyte[] p0, long p1)
        {
            WriteConformantArray<sbyte>(p0, p1);
        }
        public void Write_10(Struct_4[] p0, long p1, long p2)
        {
            WriteConformantVaryingStructArray<Struct_4>(p0, p1, p2);
        }
        public void Write_11(sbyte[] p0, long p1, long p2)
        {
            WriteConformantVaryingArray<sbyte>(p0, p1, p2);
        }
    }
    internal class _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<Struct_0>();
        }
        public Struct_1 Read_1()
        {
            return ReadStruct<Struct_1>();
        }
        public Struct_2 Read_2()
        {
            return ReadStruct<Struct_2>();
        }
        public Struct_3 Read_3()
        {
            return ReadStruct<Struct_3>();
        }
        public Struct_4 Read_4()
        {
            return ReadStruct<Struct_4>();
        }
        public short[] Read_5()
        {
            return ReadConformantVaryingArray<short>();
        }
        public sbyte[] Read_6()
        {
            return ReadConformantVaryingArray<sbyte>();
        }
        public sbyte[] Read_7()
        {
            return ReadConformantVaryingArray<sbyte>();
        }
        public sbyte[] Read_8()
        {
            return ReadConformantVaryingArray<sbyte>();
        }
        public sbyte[] Read_9()
        {
            return ReadConformantArray<sbyte>();
        }
        public Struct_4[] Read_10()
        {
            return ReadConformantVaryingStructArray<Struct_4>();
        }
        public sbyte[] Read_11()
        {
            return ReadConformantVaryingArray<sbyte>();
        }
    }
    #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.WriteInt16(Member0);
            m.WriteInt16(Member2);
            m.WriteEmbeddedPointer<short[], long, long>(Member8, new System.Action<short[], long, long>(m.Write_5), (Member2 / 2), (Member0 / 2));
        }
        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.ReadInt16();
            Member8 = u.ReadEmbeddedPointer<short[]>(new System.Func<short[]>(u.Read_5), false);
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public short Member0;
        public short Member2;
        public NtApiDotNet.Ndr.Marshal.NdrEmbeddedPointer<short[]> Member8;
        public static Struct_0 CreateDefault()
        {
            return new Struct_0();
        }
        public Struct_0(short Member0, short Member2, short[] Member8)
        {
            this.Member0 = Member0;
            this.Member2 = Member2;
            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.Write_2(Member8);
            m.WriteSByte(Member18);
        }
        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.Read_2();
            Member18 = u.ReadSByte();
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public int Member0;
        public Struct_2 Member8;
        public sbyte Member18;
        public static Struct_1 CreateDefault()
        {
            return new Struct_1();
        }
        public Struct_1(int Member0, Struct_2 Member8, sbyte Member18)
        {
            this.Member0 = Member0;
            this.Member8 = Member8;
            this.Member18 = Member18;
        }
    }
    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<sbyte[], long, long>(Member0, new System.Action<sbyte[], long, long>(m.Write_6), Member8, MemberC);
            m.WriteInt32(Member8);
            m.WriteInt32(MemberC);
        }
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Unmarshal(NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer u)
        {
            Unmarshal(((_Unmarshal_Helper)(u)));
        }
        private void Unmarshal(_Unmarshal_Helper u)
        {
            Member0 = u.ReadEmbeddedPointer<sbyte[]>(new System.Func<sbyte[]>(u.Read_6), false);
            Member8 = u.ReadInt32();
            MemberC = u.ReadInt32();
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public NtApiDotNet.Ndr.Marshal.NdrEmbeddedPointer<sbyte[]> Member0;
        public int Member8;
        public int MemberC;
        public static Struct_2 CreateDefault()
        {
            return new Struct_2();
        }
        public Struct_2(sbyte[] Member0, int Member8, int MemberC)
        {
            this.Member0 = Member0;
            this.Member8 = Member8;
            this.MemberC = MemberC;
        }
    }
    public struct Struct_3 : 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_3 CreateDefault()
        {
            return new Struct_3();
        }
        public Struct_3(int Member0, int Member4)
        {
            this.Member0 = Member0;
            this.Member4 = Member4;
        }
    }
    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<Struct_0>(Member0, new System.Action<Struct_0>(m.Write_0));
            m.WriteInt32(Member8);
            m.WriteInt32(MemberC);
            m.WriteInt32(Member10);
        }
        void NtApiDotNet.Ndr.Marshal.INdrStructure.Unmarshal(NtApiDotNet.Ndr.Marshal.NdrUnmarshalBuffer u)
        {
            Unmarshal(((_Unmarshal_Helper)(u)));
        }
        private void Unmarshal(_Unmarshal_Helper u)
        {
            Member0 = u.ReadEmbeddedPointer<Struct_0>(new System.Func<Struct_0>(u.Read_0), false);
            Member8 = u.ReadInt32();
            MemberC = u.ReadInt32();
            Member10 = u.ReadInt32();
        }
        int NtApiDotNet.Ndr.Marshal.INdrStructure.GetAlignment()
        {
            return 4;
        }
        public NtApiDotNet.Ndr.Marshal.NdrEmbeddedPointer<Struct_0> Member0;
        public int Member8;
        public int MemberC;
        public int Member10;
        public static Struct_4 CreateDefault()
        {
            return new Struct_4();
        }
        public Struct_4(System.Nullable<Struct_0> Member0, int Member8, int MemberC, int Member10)
        {
            this.Member0 = Member0;
            this.Member8 = Member8;
            this.MemberC = MemberC;
            this.Member10 = Member10;
        }
    }
    #endregion
    #region Client Implementation
    public sealed class Client : NtApiDotNet.Win32.Rpc.RpcClientBase
    {
        public Client() : 
                base("338cd001-2244-31f1-aaaa-900038001003", 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 OpenClassesRoot(System.Nullable<char> p0, int p1, out NtApiDotNet.Ndr.Marshal.NdrContextHandle p2)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteReferent(p0, new System.Action<char>(m.WriteChar));
            m.WriteInt32(p1);
            _Unmarshal_Helper u = SendReceive(0, m);
            p2 = u.ReadContextHandle();
            return u.ReadUInt32();
        }
        public uint OpenCurrentUser(System.Nullable<char> p0, int p1, out NtApiDotNet.Ndr.Marshal.NdrContextHandle p2)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteReferent(p0, new System.Action<char>(m.WriteChar));
            m.WriteInt32(p1);
            _Unmarshal_Helper u = SendReceive(1, m);
            p2 = u.ReadContextHandle();
            return u.ReadUInt32();
        }
        public uint OpenLocalMachine(System.Nullable<char> p0, int p1, out NtApiDotNet.Ndr.Marshal.NdrContextHandle p2)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteReferent(p0, new System.Action<char>(m.WriteChar));
            m.WriteInt32(p1);
            _Unmarshal_Helper u = SendReceive(2, m);
            p2 = u.ReadContextHandle();
            return u.ReadUInt32();
        }
        public uint OpenPerformanceData(System.Nullable<char> p0, int p1, out NtApiDotNet.Ndr.Marshal.NdrContextHandle p2)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteReferent(p0, new System.Action<char>(m.WriteChar));
            m.WriteInt32(p1);
            _Unmarshal_Helper u = SendReceive(3, m);
            p2 = u.ReadContextHandle();
            return u.ReadUInt32();
        }
        public uint OpenUsers(System.Nullable<char> p0, int p1, out NtApiDotNet.Ndr.Marshal.NdrContextHandle p2)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteReferent(p0, new System.Action<char>(m.WriteChar));
            m.WriteInt32(p1);
            _Unmarshal_Helper u = SendReceive(4, m);
            p2 = u.ReadContextHandle();
            return u.ReadUInt32();
        }
        public uint BaseRegCloseKey(ref NtApiDotNet.Ndr.Marshal.NdrContextHandle p0)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            _Unmarshal_Helper u = SendReceive(5, m);
            p0 = u.ReadContextHandle();
            return u.ReadUInt32();
        }
        public uint BaseRegCreateKey(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1, Struct_0 p2, int p3, int p4, System.Nullable<Struct_1> p5, out NtApiDotNet.Ndr.Marshal.NdrContextHandle p6, ref System.Nullable<int> p7)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            m.Write_0(p2);
            m.WriteInt32(p3);
            m.WriteInt32(p4);
            m.WriteReferent(p5, new System.Action<Struct_1>(m.Write_1));
            m.WriteReferent(p7, new System.Action<int>(m.WriteInt32));
            _Unmarshal_Helper u = SendReceive(6, m);
            p6 = u.ReadContextHandle();
            p7 = u.ReadReferentValue<int>(new System.Func<int>(u.ReadInt32), false);
            return u.ReadUInt32();
        }
        public uint BaseRegDeleteKey(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            _Unmarshal_Helper u = SendReceive(7, m);
            return u.ReadUInt32();
        }
        public uint BaseRegDeleteValue(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            _Unmarshal_Helper u = SendReceive(8, m);
            return u.ReadUInt32();
        }
        public uint SafeBaseRegEnumKey(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, int p1, Struct_0 p2, out Struct_0 p3, System.Nullable<Struct_0> p4, out System.Nullable<Struct_0> p5, ref System.Nullable<Struct_3> p6)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.WriteInt32(p1);
            m.Write_0(p2);
            m.WriteReferent(p4, new System.Action<Struct_0>(m.Write_0));
            m.WriteReferent(p6, new System.Action<Struct_3>(m.Write_3));
            _Unmarshal_Helper u = SendReceive(9, m);
            p3 = u.Read_0();
            p5 = u.ReadReferentValue<Struct_0>(new System.Func<Struct_0>(u.Read_0), false);
            p6 = u.ReadReferentValue<Struct_3>(new System.Func<Struct_3>(u.Read_3), false);
            return u.ReadUInt32();
        }
        public uint SafeBaseRegEnumValue(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, int p1, Struct_0 p2, out Struct_0 p3, ref System.Nullable<int> p4, ref sbyte[] p5, ref System.Nullable<int> p6, ref System.Nullable<int> p7)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.WriteInt32(p1);
            m.Write_0(p2);
            m.WriteReferent(p4, new System.Action<int>(m.WriteInt32));
            m.WriteReferent(p5, new System.Action<sbyte[], long, long>(m.Write_7), NtApiDotNet.Win32.Rpc.RpcUtils.OpTernary(NtApiDotNet.Win32.Rpc.RpcUtils.ToBool(p6), NtApiDotNet.Win32.Rpc.RpcUtils.DeRef(p6), 0), NtApiDotNet.Win32.Rpc.RpcUtils.OpTernary(NtApiDotNet.Win32.Rpc.RpcUtils.ToBool(p7), NtApiDotNet.Win32.Rpc.RpcUtils.DeRef(p7), 0));
            m.WriteReferent(p6, new System.Action<int>(m.WriteInt32));
            m.WriteReferent(p7, new System.Action<int>(m.WriteInt32));
            _Unmarshal_Helper u = SendReceive(10, m);
            p3 = u.Read_0();
            p4 = u.ReadReferentValue<int>(new System.Func<int>(u.ReadInt32), false);
            p5 = u.ReadReferent<sbyte[]>(new System.Func<sbyte[]>(u.Read_7), false);
            p6 = u.ReadReferentValue<int>(new System.Func<int>(u.ReadInt32), false);
            p7 = u.ReadReferentValue<int>(new System.Func<int>(u.ReadInt32), false);
            return u.ReadUInt32();
        }
        public uint BaseRegFlushKey(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            _Unmarshal_Helper u = SendReceive(11, m);
            return u.ReadUInt32();
        }
        public uint SafeBaseRegGetKeySecurity(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, int p1, Struct_2 p2, out Struct_2 p3)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.WriteInt32(p1);
            m.Write_2(p2);
            _Unmarshal_Helper u = SendReceive(12, m);
            p3 = u.Read_2();
            return u.ReadUInt32();
        }
        public uint BaseRegLoadKey(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1, Struct_0 p2)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            m.Write_0(p2);
            _Unmarshal_Helper u = SendReceive(13, m);
            return u.ReadUInt32();
        }
        public uint BaseRegNotifyChangeKeyValue(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, sbyte p1, int p2, int p3, Struct_0 p4, Struct_0 p5, System.Nullable<Struct_1> p6)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.WriteSByte(p1);
            m.WriteInt32(p2);
            m.WriteInt32(p3);
            m.Write_0(p4);
            m.Write_0(p5);
            m.WriteReferent(p6, new System.Action<Struct_1>(m.Write_1));
            _Unmarshal_Helper u = SendReceive(14, m);
            return u.ReadUInt32();
        }
        public uint BaseRegOpenKey(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1, int p2, int p3, out NtApiDotNet.Ndr.Marshal.NdrContextHandle p4)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            m.WriteInt32(p2);
            m.WriteInt32(p3);
            _Unmarshal_Helper u = SendReceive(15, m);
            p4 = u.ReadContextHandle();
            return u.ReadUInt32();
        }
        public uint SafeBaseRegQueryInfoKey(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1, out Struct_0 p2, out int p3, out int p4, out int p5, out int p6, out int p7, out int p8, out int p9, out Struct_3 p10)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            _Unmarshal_Helper u = SendReceive(16, m);
            p2 = u.Read_0();
            p3 = u.ReadInt32();
            p4 = u.ReadInt32();
            p5 = u.ReadInt32();
            p6 = u.ReadInt32();
            p7 = u.ReadInt32();
            p8 = u.ReadInt32();
            p9 = u.ReadInt32();
            p10 = u.Read_3();
            return u.ReadUInt32();
        }
        public uint BaseRegQueryValue(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1, ref System.Nullable<int> p2, ref sbyte[] p3, ref System.Nullable<int> p4, ref System.Nullable<int> p5)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            m.WriteReferent(p2, new System.Action<int>(m.WriteInt32));
            m.WriteReferent(p3, new System.Action<sbyte[], long, long>(m.Write_8), NtApiDotNet.Win32.Rpc.RpcUtils.OpTernary(NtApiDotNet.Win32.Rpc.RpcUtils.ToBool(p4), NtApiDotNet.Win32.Rpc.RpcUtils.DeRef(p4), 0), NtApiDotNet.Win32.Rpc.RpcUtils.OpTernary(NtApiDotNet.Win32.Rpc.RpcUtils.ToBool(p5), NtApiDotNet.Win32.Rpc.RpcUtils.DeRef(p5), 0));
            m.WriteReferent(p4, new System.Action<int>(m.WriteInt32));
            m.WriteReferent(p5, new System.Action<int>(m.WriteInt32));
            _Unmarshal_Helper u = SendReceive(17, m);
            p2 = u.ReadReferentValue<int>(new System.Func<int>(u.ReadInt32), false);
            p3 = u.ReadReferent<sbyte[]>(new System.Func<sbyte[]>(u.Read_8), false);
            p4 = u.ReadReferentValue<int>(new System.Func<int>(u.ReadInt32), false);
            p5 = u.ReadReferentValue<int>(new System.Func<int>(u.ReadInt32), false);
            return u.ReadUInt32();
        }
        public uint BaseRegReplaceKey(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1, Struct_0 p2, Struct_0 p3)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            m.Write_0(p2);
            m.Write_0(p3);
            _Unmarshal_Helper u = SendReceive(18, m);
            return u.ReadUInt32();
        }
        public uint BaseRegRestoreKey(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1, int p2)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            m.WriteInt32(p2);
            _Unmarshal_Helper u = SendReceive(19, m);
            return u.ReadUInt32();
        }
        public uint BaseRegSaveKey(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1, System.Nullable<Struct_1> p2)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            m.WriteReferent(p2, new System.Action<Struct_1>(m.Write_1));
            _Unmarshal_Helper u = SendReceive(20, m);
            return u.ReadUInt32();
        }
        public uint BaseRegSetKeySecurity(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, int p1, Struct_2 p2)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.WriteInt32(p1);
            m.Write_2(p2);
            _Unmarshal_Helper u = SendReceive(21, m);
            return u.ReadUInt32();
        }
        public uint BaseRegSetValue(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1, int p2, sbyte[] p3, int p4)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            m.WriteInt32(p2);
            m.Write_9(NtApiDotNet.Win32.Rpc.RpcUtils.CheckNull(p3, "p3"), p4);
            m.WriteInt32(p4);
            _Unmarshal_Helper u = SendReceive(22, m);
            return u.ReadUInt32();
        }
        public uint BaseRegUnLoadKey(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            _Unmarshal_Helper u = SendReceive(23, m);
            return u.ReadUInt32();
        }
        public int BaseAbortSystemShutdown(System.Nullable<char> p0, System.Nullable<Struct_0> p1, int p2, sbyte p3, sbyte p4)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteReferent(p0, new System.Action<char>(m.WriteChar));
            m.WriteReferent(p1, new System.Action<Struct_0>(m.Write_0));
            m.WriteInt32(p2);
            m.WriteSByte(p3);
            m.WriteSByte(p4);
            _Unmarshal_Helper u = SendReceive(24, m);
            return u.ReadInt32();
        }
        public int BaseAbortSystemShutdown_25(System.Nullable<char> p0)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteReferent(p0, new System.Action<char>(m.WriteChar));
            _Unmarshal_Helper u = SendReceive(25, m);
            return u.ReadInt32();
        }
        public uint BaseRegGetVersion(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, out int p1)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            _Unmarshal_Helper u = SendReceive(26, m);
            p1 = u.ReadInt32();
            return u.ReadUInt32();
        }
        public uint OpenCurrentConfig(System.Nullable<char> p0, int p1, out NtApiDotNet.Ndr.Marshal.NdrContextHandle p2)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteReferent(p0, new System.Action<char>(m.WriteChar));
            m.WriteInt32(p1);
            _Unmarshal_Helper u = SendReceive(27, m);
            p2 = u.ReadContextHandle();
            return u.ReadUInt32();
        }
        public uint BaseAbortSystemShutdown_28(System.Nullable<char> p0, int p1, out NtApiDotNet.Ndr.Marshal.NdrContextHandle p2)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteReferent(p0, new System.Action<char>(m.WriteChar));
            m.WriteInt32(p1);
            _Unmarshal_Helper u = SendReceive(28, m);
            p2 = u.ReadContextHandle();
            return u.ReadUInt32();
        }
        public uint SafeBaseRegQueryMultipleValues(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_4[] p1, out Struct_4[] p2, int p3, ref sbyte[] p4, ref int p5)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_10(NtApiDotNet.Win32.Rpc.RpcUtils.CheckNull(p1, "p1"), p3, p3);
            m.WriteInt32(p3);
            m.WriteReferent(p4, new System.Action<sbyte[], long, long>(m.Write_11), NtApiDotNet.Win32.Rpc.RpcUtils.DeRef(p5), NtApiDotNet.Win32.Rpc.RpcUtils.DeRef(p5));
            m.WriteInt32(p5);
            _Unmarshal_Helper u = SendReceive(29, m);
            p2 = u.Read_10();
            p4 = u.ReadReferent<sbyte[]>(new System.Func<sbyte[]>(u.Read_11), false);
            p5 = u.ReadInt32();
            return u.ReadUInt32();
        }
        public int BaseAbortSystemShutdown_30(System.Nullable<char> p0, System.Nullable<Struct_0> p1, int p2, sbyte p3, sbyte p4, int p5)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteReferent(p0, new System.Action<char>(m.WriteChar));
            m.WriteReferent(p1, new System.Action<Struct_0>(m.Write_0));
            m.WriteInt32(p2);
            m.WriteSByte(p3);
            m.WriteSByte(p4);
            m.WriteInt32(p5);
            _Unmarshal_Helper u = SendReceive(30, m);
            return u.ReadInt32();
        }
        public uint BaseRegSaveKeyEx(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1, System.Nullable<Struct_1> p2, int p3)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            m.WriteReferent(p2, new System.Action<Struct_1>(m.Write_1));
            m.WriteInt32(p3);
            _Unmarshal_Helper u = SendReceive(31, m);
            return u.ReadUInt32();
        }
        public uint OpenPerformanceText(System.Nullable<char> p0, int p1, out NtApiDotNet.Ndr.Marshal.NdrContextHandle p2)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteReferent(p0, new System.Action<char>(m.WriteChar));
            m.WriteInt32(p1);
            _Unmarshal_Helper u = SendReceive(32, m);
            p2 = u.ReadContextHandle();
            return u.ReadUInt32();
        }
        public uint OpenPerformanceNlsText(System.Nullable<char> p0, int p1, out NtApiDotNet.Ndr.Marshal.NdrContextHandle p2)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteReferent(p0, new System.Action<char>(m.WriteChar));
            m.WriteInt32(p1);
            _Unmarshal_Helper u = SendReceive(33, m);
            p2 = u.ReadContextHandle();
            return u.ReadUInt32();
        }
        public uint SafeBaseRegQueryMultipleValues2(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_4[] p1, out Struct_4[] p2, int p3, ref sbyte[] p4, int p5, out int p6)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_10(NtApiDotNet.Win32.Rpc.RpcUtils.CheckNull(p1, "p1"), p3, p3);
            m.WriteInt32(p3);
            m.WriteReferent(p4, new System.Action<sbyte[], long, long>(m.Write_11), NtApiDotNet.Win32.Rpc.RpcUtils.DeRef(p5), NtApiDotNet.Win32.Rpc.RpcUtils.DeRef(p5));
            m.WriteInt32(p5);
            _Unmarshal_Helper u = SendReceive(34, m);
            p2 = u.Read_10();
            p4 = u.ReadReferent<sbyte[]>(new System.Func<sbyte[]>(u.Read_11), false);
            p6 = u.ReadInt32();
            return u.ReadUInt32();
        }
        public uint BaseRegDeleteKeyEx(NtApiDotNet.Ndr.Marshal.NdrContextHandle p0, Struct_0 p1, int p2, int p3)
        {
            _Marshal_Helper m = new _Marshal_Helper();
            m.WriteContextHandle(p0);
            m.Write_0(p1);
            m.WriteInt32(p2);
            m.WriteInt32(p3);
            _Unmarshal_Helper u = SendReceive(35, m);
            return u.ReadUInt32();
        }
    }
    #endregion
}

