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(); }
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)); }
internal extern static int CoGetApartmentType(out APTTYPE pAptType, out APTTYPEQUALIFIER pAptQualifier);
public static extern int CoGetDefaultContext(APTTYPE aptType, [NativeTypeName("const IID &")] Guid *riid, void **ppv);