I' having an hard time trying to understand COM apartments in outprocess environment.
Basically I can't understand why the client is required to call CoInitializeEx
to register it's own thread in an apartment.
I can understand object used by server threads and server threads living in STA or MTA. But I can't understand why the client should be concerned about this.
Every documentation/guide says the client has to call CoInitializeEx
to register itself in an apartment. Does that mean that the server keeps tracks of client's threads?
Or that the apartment data is allocated on the client process as well?