示例#1
0
        private void InitSteamApps006()
        {
            if (SteamClient017 == null)
            {
                WriteToWindowLog("ISteamClient017 must be initialized prior to ISteamApps006.");
                return;
            }

            //var interfaceVersionString = ((InterfaceVersion)typeof(ISteamApps006).GetCustomAttribute(typeof(InterfaceVersion))).Version;
            //var steamApps006InterfacePtr = SteamClient017.GetISteamApps(User, Pipe, interfaceVersionString);
            //if (steamApps006InterfacePtr == IntPtr.Zero)
            //{
            //    WriteToWindowLog("Failed to initialize ISteamApps006!");
            //    return;
            //}
            //
            //WriteToWindowLog("Successfully initialized ISteamApps006!");

            //SteamApps006InterfacePtr = steamApps006InterfacePtr;
            //SteamApps006 = new ISteamApps006(SteamApps006InterfacePtr);

            SteamApps006 = SteamClient017.GetISteamApps <ISteamApps006>(User, Pipe);
            if (SteamApps006 == null)
            {
                WriteToWindowLog("Failed to initialize ISteamApps006!");
                return;
            }
            WriteToWindowLog("Successfully initialized ISteamApps006!");
        }
示例#2
0
        private void Cleanup()
        {
            if (SteamClient017 == null)
            {
                return;
            }

            SteamClient017.ReleaseUser(Pipe, User);
            SteamClient017.BReleaseSteamPipe(Pipe);
        }
示例#3
0
        private void InitSteamClient017()
        {
            if (!IsSteamInitialized)
            {
                WriteToWindowLog("Steam must be initialized prior to ISteamClient017.");
                return;
            }

            //     - For steam.dll interfaces use 'Steam.CreateSteamInterface'
            //     - For steamclient.dll/steamclient64.dll interfaces use 'Steam.CreateInterface'

            SteamClient017 = Steam.CreateInterface <ISteamClient017>();

            if (SteamClient017 == null)
            {
                WriteToWindowLog("Failed to initialize ISteamClient017!");
                return;
            }

            WriteToWindowLog("Successfully initialized ISteamClient017!");

            Pipe = SteamClient017.CreateSteamPipe();
            User = SteamClient017.ConnectToGlobalUser(Pipe);
        }