Archived

This forum has been archived. Please start a new discussion on GitHub.

ICE and COM initialization question

Hi all,

I'm in the process of refactoring a Visual c++6 application. We are going from a two tiered architecture (app+db) to a three tier one (app+ice servers+db), using ICE for middleware.

Unfortunately, on the server side, I have to deal with some legacy libraries that use COM, so I need to call CoInitializeEx and CoUninitialize, ideally at the start, and exit of each thread that uses COM.

I think I can do it as the first and last operation on the implementation of ICE methods on the server side, but I was wondering if there is a way to put this calls directly on the threads of the thread-pool managed by ICE.

Thanks,
Giovanni

Comments

  • There is no "thread creation hook" in Ice, that would allow you to have a thread call user code upon creation. Perhaps it would be a good idea to add something like this. We will put it on our todo list :)