[omniORB] using omniORB2 from an MFC Windows app, has anyone done this?

Sai-Lai Lo S.Lo@orl.co.uk
23 Sep 1998 18:37:50 +0100


Bill,

In addition to what Hennig Andreas <Andreas.Hennig@mchp.siemens.de> has
suggested, one can also change the omnithread library to create threads
using the MFC API instead of the win32 API. It should be straightforward
for someone who knows his way around MFC (and I'm not such a person
luckily...).

The source to change is src/lib/omnithread/nt.cc. (Please start with
snapshot_980827.)

Any volunteers?

I'm thinking may be we should make this a link time or runtime option.

Sai-Lai

>>>>> wtflanders  writes:

> Hi,
> I have a newbie question on using omniORB2 from an MFC Document/View app.
  
> I have an MFC application that is a CORBA server.  It contains a CORBA 
> object I'll call HOST.  When external applications call HOST's operations
> can the implementation of that operation safely access my MFC objects? (ie:
> invoke operations on it's Document.)  I have gotten this to work if the
> HOST operation does not call any operations that cause MFC/CWinApp to
> call "AfxAssertValidObject(..)".  If it does my CView's message map is null,
> which appears to be caused by CWinApp executing in one thread and my 
> HOST object's operation in another?  (I suppose I need a CORBA 101 course.)
> Can anyone shed some light on what is happening here?  Or, if you've 
> successfully mixed the omniORB2 and MFC how did you architect the app?
> My approach is to embed the CORBA objects in my CDocument derived class and
> have the CORBA objects manipulate data in the doc.

-- 
Dr. Sai-Lai Lo                          |       Research Scientist
                                        |
E-mail:         S.Lo@orl.co.uk          |       Olivetti & Oracle Research Lab
                                        |       24a Trumpington Street
Tel:            +44 223 343000          |       Cambridge CB2 1QA
Fax:            +44 223 313542          |       ENGLAND