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();
        }
Beispiel #3
0
 public int GetCurrentApartmentType(ref APTTYPE pAptType)
 {
     if (m_GetCurrentApartmentTypeFunc == null)
     {
         var fp = GetFunctionPointer(3);
         m_GetCurrentApartmentTypeFunc = (GetCurrentApartmentTypeFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetCurrentApartmentTypeFunc));
     }
     return(m_GetCurrentApartmentTypeFunc(m_ptr, ref pAptType));
 }
Beispiel #4
0
 internal extern static int CoGetApartmentType(out APTTYPE pAptType, out APTTYPEQUALIFIER pAptQualifier);
Beispiel #5
0
 public static extern int CoGetDefaultContext(APTTYPE aptType, [NativeTypeName("const IID &")] Guid *riid, void **ppv);