[omniORB] Beginners Question: ORB_Init in a GUI app.

A.A.Gerritsen a.a.gerritsen@phys.uu.nl
Wed, 12 Jan 2000 19:36:29 +0100


Hello,

I figgered out the cause of my crashes afterwards, after the program shuts
down and all objects's deconstructors have been called.

It is the initialisation of the ORB. I use a GUI app, so I have no argc and
argv to pass to them. Unfortunately there is no other initialisation method
(is there, I didn't find it?), so I hacked a bit like this:

  int    pseudoargc = 1 ;
  char** pseudoargv = new char*[1] ;
  pseudoargv[0] = "SControl.exe" ;
  m_theORB = CORBA::ORB_init(pseudoargc, pseudoargv ,"omniORB2") ;

This works fine and my app does all it needs to do, besides causesing a
crash afterwards. So this must be 'an invalid hack'.
Question is then, how to solve this in a better way.

BTW I use onmiORB 2.80, VC++ 6.0, NT4 SP6 and MFC, static linking and as
sualual still need to include the dynamic lib.

Best regards,

Armin
-
"What really interests me is whether God had any choice in the creation of
the world."
 - Albert Einstein