Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="name"></param>
        /// <returns>New context created</returns>
        public static IntPtr CreateInterfaceNoUser(int pipe_id, string name)
        {
            // In most cases none of these should be mapped (With the exception of ISteamUtils)
            var(context, iface, is_map) = Context.CreateInterface(name, true);

            if (context == IntPtr.Zero)
            {
                return(IntPtr.Zero);
            }

            iface.ClientId    = -1;
            iface.InterfaceId = -1;

            if (is_map)
            {
                iface.InterfaceId = Server.CreateInterfaceNoUser(pipe_id, name);

                var map = (IBaseInterfaceMap)iface;
                map.PipeId = pipe_id;
            }

            NoUserInterfaces.Add(iface);

            return(context);
        }
Example #2
0
        public static IntPtr CreateInterfaceNoUserNoPipe(string name)
        {
            // None of these can possibly be maps!
            var(context, iface, _) = Context.CreateInterface(name);

            if (context == IntPtr.Zero)
            {
                return(IntPtr.Zero);
            }

            iface.ClientId    = -1;
            iface.InterfaceId = -1;

            NoUserInterfaces.Add(iface);

            return(context);
        }