[][src]Function winrt::init_apartment

pub fn init_apartment(apartment_type: ApartmentType)

Initializes the current thread for use with the Windows Runtime. This is usually not needed, because winrt-rust ensures that threads are implicitly assigned to the multi-threaded apartment (MTA). However, if you need your thread to be initialized as a single-threaded apartment (STA), you can call init_apartment(ApartmentType::STA). Only call this when you own the thread!