[omniORB] omniORB thread creation

Stitcher, Andrew astitcher@orchestream.com
Wed, 20 Mar 2002 10:39:50 -0000


If you put your code in a DLL then the dllmain function gets called by
Windows on every thread creation (I think there can be exceptions under very
strange circumstances, but this is the general way under Windows to
intercept thread creation).

Andrew

> -----Original Message-----
> From: Kevin Wooten [mailto:kwooten@itracs.com]
> Sent: 18 March 2002 17:04
> To: omniorb-list@uk.research.att.com
> Subject: RE: [omniORB] omniORB thread creation 
> 
> 
> Unfortunatly we do. We are using COM ( again, UNFORTUNATLY ) 
> which requires calls to CoInitialize, and CoUninitialize. Are 
> current solution is to call these functions as needed during 
> a method invocation. This is causing problems, one, objects 
> that are marshalled across threads in COM seem to get 
> disposed of. Two, it slows everything down. What we need is 
> to initialize on thread create, and uninitialize on 
> destruction. How hard would it be to add this wrapper back, 
> since I am developing with omniORB4 (for the wide strings)? 
> Maybe I can help??
> 
> >> -----Original Message-----
> >> From: Duncan Grisby [mailto:dgrisby@uk.research.att.com]
> >> Sent: Monday, March 18, 2002 4:38 AM
> >> To: Kevin Wooten
> >> Cc: omniorb-list@uk.research.att.com
> >> Subject: Re: [omniORB] omniORB thread creation 
> >> 
> >> 
> >> On Wednesday 13 March, "Kevin Wooten" wrote:
> >> 
> >> > Is there any way to run some startup code whenever a thread is
> >> > created by omniORB? Specifically we need to initialize COM so our
> >> > SQLServer database driver works.
> >> 
> >> See giopServerThreadWrapper in include/omniORB3/omniORB.h.
> >> 
> >> Do you _really_ have to do that?  The wrapper is no longer used in
> >> omniORB 4. Perhaps I should put it back...
> >> 
> >> Cheers,
> >> 
> >> Duncan.
> >> 
> >> -- 
> >>  -- Duncan Grisby  \  Research Engineer  --
> >>   -- AT&T Laboratories Cambridge          --
> >>    -- http://www.uk.research.att.com/~dpg1 --
> >> 
> 


--
This communication contains confidential information intended solely for the use of the individual/s and/or entity or entities to whom it was intended to be addressed.  If you are not the intended recipient, be aware that any disclosure, copying, distribution, or use of the contents of this transmission is prohibited.  If you have received this communication in error, please contact the sender immediately, delete this communication from your system, and do not disclose its contents to any third party, or use its contents.  Any opinions expressed are solely those of the author and do not necessarily represent those of Orchestream Ltd or its group of companies unless otherwise specifically stated.