In COM STA model, a hidden Window will be created with synchronized message pump operation. I have seen and debugged a couple of samples. My quesitons are,
1. Who (which party) is responsible for generating code to create the hidden Window and generate message pump (retrieve message one-by-one from message queue so that all processing to the component is synchronized)? Generated by COM Runtime (I suspect it generated by COM Runtime, because I have seen no code in the samples I studied to explicitly create the hidden Window)?
2. If it is created by the COM Runtime? When such code is generated? During call to CoInitializeEx and when specifiying parameter value for dwCoInit (COINIT_APARTMENTTHREADED or COINIT_MULTITHREADED)?
3. Where is the generated binary code? Injected by linker in the result COM DLL or EXE?
thanks in advance,