private ComThreadingInfo()
 {
     IComThreadingInfo info = (IComThreadingInfo) CoGetObjectContext(ref this.IID_IUnknown);
     this.apartmentType = info.GetCurrentApartmentType();
     this.threadType = info.GetCurrentThreadType();
     this.logicalThreadId = info.GetCurrentLogicalThreadId();
 }
        private ComThreadingInfo()
        {
            IComThreadingInfo info = (IComThreadingInfo)CoGetObjectContext(ref this.IID_IUnknown);

            this.apartmentType   = info.GetCurrentApartmentType();
            this.threadType      = info.GetCurrentThreadType();
            this.logicalThreadId = info.GetCurrentLogicalThreadId();
        }
Exemplo n.º 3
0
 public int GetCurrentThreadType(ref THDTYPE pThreadType)
 {
     if (m_GetCurrentThreadTypeFunc == null)
     {
         var fp = GetFunctionPointer(4);
         m_GetCurrentThreadTypeFunc = (GetCurrentThreadTypeFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetCurrentThreadTypeFunc));
     }
     return(m_GetCurrentThreadTypeFunc(m_ptr, ref pThreadType));
 }