Exemplo n.º 1
0
        // Steamworks.NET Specific
        private void BuildCCallbackBase()
        {
            VTable = new CCallbackBaseVTable()
            {
                m_RunCallResult        = OnRunCallResult,
                m_RunCallback          = OnRunCallback,
                m_GetCallbackSizeBytes = OnGetCallbackSizeBytes
            };
            m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(CCallbackBaseVTable)));
            Marshal.StructureToPtr(VTable, m_pVTable, false);

            m_CCallbackBase = new CCallbackBase()
            {
                m_vfptr          = m_pVTable,
                m_nCallbackFlags = 0,
                m_iCallback      = CallbackIdentities.GetCallbackIdentity(typeof(T))
            };
            m_pCCallbackBase = GCHandle.Alloc(m_CCallbackBase, GCHandleType.Pinned);
        }
Exemplo n.º 2
0
        private void BuildCCallbackBase()
        {
            CCallbackBaseVTable table = new CCallbackBaseVTable {
                m_RunCallResult        = new CCallbackBaseVTable.RunCRDel(this.OnRunCallResult),
                m_RunCallback          = new CCallbackBaseVTable.RunCBDel(this.OnRunCallback),
                m_GetCallbackSizeBytes = new CCallbackBaseVTable.GetCallbackSizeBytesDel(this.OnGetCallbackSizeBytes)
            };

            this.VTable    = table;
            this.m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(CCallbackBaseVTable)));
            Marshal.StructureToPtr(this.VTable, this.m_pVTable, false);
            CCallbackBase base2 = new CCallbackBase {
                m_vfptr          = this.m_pVTable,
                m_nCallbackFlags = 0,
                m_iCallback      = CallbackIdentities.GetCallbackIdentity(typeof(T))
            };

            this.m_CCallbackBase  = base2;
            this.m_pCCallbackBase = GCHandle.Alloc(this.m_CCallbackBase, GCHandleType.Pinned);
        }
Exemplo n.º 3
0
        public void SetGameserverFlag()
        {
            CCallbackBase expr_06 = this.m_CCallbackBase;

            expr_06.m_nCallbackFlags |= 2;
        }
Exemplo n.º 4
0
        public void SetGameserverFlag()
        {
            CCallbackBase ccallbackBase = this.m_CCallbackBase;

            ccallbackBase.m_nCallbackFlags |= 2;
        }