private void OnRunCallResult(
#if !STDCALL
            IntPtr thisptr,
#endif
            IntPtr pvParam, bool bFailed, ulong hSteamAPICall)
        {
            SteamAPICall_t hAPICall = (SteamAPICall_t)hSteamAPICall;

            if (hAPICall == m_hAPICall)
            {
                try {
                    m_Func((T)Marshal.PtrToStructure(pvParam, typeof(T)), bFailed);
                }
                catch (Exception e) {
                    CallbackDispatcher.ExceptionHandler(e);
                }

                // The official SDK sets m_hAPICall to invalid before calling the callresult function,
                // this doesn't let us access .Handle from within the function though.
                if (hAPICall == m_hAPICall)                   // Ensure that m_hAPICall has not been changed in m_Func
                {
                    m_hAPICall = SteamAPICall_t.Invalid;      // Caller unregisters for us
                }
            }
        }
Ejemplo n.º 2
0
 private void OnRunCallback(IntPtr pvParam)
 {
     try
     {
         this.m_Func((T)Marshal.PtrToStructure(pvParam, typeof(T)));
     }
     catch (Exception exception1)
     {
         CallbackDispatcher.ExceptionHandler(exception1);
     }
 }
Ejemplo n.º 3
0
 private void OnRunCallResult(IntPtr pvParam, bool bFailed, ulong hSteamAPICall)
 {
     try
     {
         this.m_Func((T)Marshal.PtrToStructure(pvParam, typeof(T)));
     }
     catch (Exception exception1)
     {
         CallbackDispatcher.ExceptionHandler(exception1);
     }
 }
 private void InternalOnServerResponded(HServerListRequest hRequest, int iServer)
 {
     try
     {
         m_ServerResponded(hRequest, iServer);
     }
     catch (Exception e)
     {
         CallbackDispatcher.ExceptionHandler(e);
     }
 }
 private void InternalOnRefreshComplete(IntPtr thisptr, HServerListRequest hRequest, EMatchMakingServerResponse response)
 {
     try
     {
         m_RefreshComplete(hRequest, response);
     }
     catch (Exception e)
     {
         CallbackDispatcher.ExceptionHandler(e);
     }
 }
 private void InternalOnServerFailedToRespond(IntPtr thisptr, HServerListRequest hRequest, int iServer)
 {
     try
     {
         m_ServerFailedToRespond(hRequest, iServer);
     }
     catch (Exception e)
     {
         CallbackDispatcher.ExceptionHandler(e);
     }
 }
Ejemplo n.º 7
0
 private void OnRunCallback(IntPtr pvParam)
 {
     this.m_hAPICall = SteamAPICall_t.Invalid;
     try
     {
         this.m_Func((T)((object)Marshal.PtrToStructure(pvParam, typeof(T))), false);
     }
     catch (Exception e)
     {
         CallbackDispatcher.ExceptionHandler(e);
     }
 }
        // Shouldn't get ever get called here, but this is what C++ Steamworks does!
        private void OnRunCallResult(
#if !STDCALL
            IntPtr thisptr,
#endif
            IntPtr pvParam, bool bFailed, ulong hSteamAPICall)
        {
            try {
                m_Func((T)Marshal.PtrToStructure(pvParam, typeof(T)));
            }
            catch (Exception e) {
                CallbackDispatcher.ExceptionHandler(e);
            }
        }
        private void OnRunCallback(
#if !STDCALL
            IntPtr thisptr,
#endif
            IntPtr pvParam)
        {
            try {
                m_Func((T)Marshal.PtrToStructure(pvParam, typeof(T)));
            }
            catch (Exception e) {
                CallbackDispatcher.ExceptionHandler(e);
            }
        }
        // Shouldn't get ever get called here, but this is what C++ Steamworks does!
        private void OnRunCallback(
#if !STDCALL
            IntPtr thisptr,
#endif
            IntPtr pvParam)
        {
            m_hAPICall = SteamAPICall_t.Invalid;             // Caller unregisters for us
            try {
                m_Func((T)Marshal.PtrToStructure(pvParam, typeof(T)), false);
            }
            catch (Exception e) {
                CallbackDispatcher.ExceptionHandler(e);
            }
        }
Ejemplo n.º 11
0
        private void OnRunCallResult(
#if !NOTHISPTR
            IntPtr thisptr,
#endif
            IntPtr pvParam, bool bFailed, ulong hSteamAPICall)
        {
            if ((SteamAPICall_t)hSteamAPICall == m_hAPICall)
            {
                try {
                    m_Func((T)Marshal.PtrToStructure(pvParam, typeof(T)), bFailed);
                }
                catch (Exception e) {
                    CallbackDispatcher.ExceptionHandler(e);
                }
                m_hAPICall = SteamAPICall_t.Invalid;                 // Caller unregisters for us
            }
        }
Ejemplo n.º 12
0
        private void OnRunCallResult(IntPtr thisptr, IntPtr pvParam, bool bFailed, ulong hSteamAPICall_)
        {
            SteamAPICall_t x = (SteamAPICall_t)hSteamAPICall_;

            if (x == m_hAPICall)
            {
                m_hAPICall = SteamAPICall_t.Invalid;
                try
                {
                    this.m_Func((T)Marshal.PtrToStructure(pvParam, typeof(T)), bFailed);
                }
                catch (Exception e)
                {
                    CallbackDispatcher.ExceptionHandler(e);
                }
            }
        }
Ejemplo n.º 13
0
        private void OnRunCallResult(IntPtr pvParam, bool bFailed, ulong hSteamAPICall)
        {
            SteamAPICall_t _t = (SteamAPICall_t)hSteamAPICall;

            if (_t == this.m_hAPICall)
            {
                try
                {
                    this.m_Func((T)Marshal.PtrToStructure(pvParam, typeof(T)), bFailed);
                }
                catch (Exception exception1)
                {
                    CallbackDispatcher.ExceptionHandler(exception1);
                }
                if (_t == this.m_hAPICall)
                {
                    this.m_hAPICall = SteamAPICall_t.Invalid;
                }
            }
        }
Ejemplo n.º 14
0
        private void OnRunCallResult(
#if !STDCALL
            IntPtr thisptr,
#endif
            IntPtr pvParam, bool bFailed, ulong hSteamAPICall)
        {
            SteamAPICall_t hAPICall = (SteamAPICall_t)hSteamAPICall;

            if (hAPICall == m_hAPICall)
            {
                try {
                    m_Func((T)Marshal.PtrToStructure(pvParam, typeof(T)), bFailed);
                }
                catch (Exception e) {
                    CallbackDispatcher.ExceptionHandler(e);
                }

                if (hAPICall == m_hAPICall)                   // Ensure that m_hAPICall has not been changed in m_Func
                {
                    m_hAPICall = SteamAPICall_t.Invalid;      // Caller unregisters for us
                }
            }
        }