Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / examples / Borland / ChatClient.cpp
blob996a0865fb6333fd24edfbac0d3161b46579acf4
1 //---------------------------------------------------------------------------
2 #include "pch.h"
3 #pragma hdrstop
4 #include "ace/ace.h"
5 #include "tao/corba.h"
6 #include "ChatClientWnd.h"
7 USEFORM("ChatClientWnd.cpp", ChatClientWindow);
8 //---------------------------------------------------------------------------
9 #pragma package(smart_init)
11 void ace_init(void)
13 ACE::init();
15 #pragma startup ace_init
17 void ace_fini(void)
19 ACE::fini();
21 #pragma exit ace_fini
22 //---------------------------------------------------------------------------
23 WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
25 try
27 Application->Initialize ();
28 Application->Title = "CORBA Chat Client";
29 Application->CreateForm(__classid(TChatClientWindow), &ChatClientWindow);
30 Application->Run ();
32 catch (Exception &exception)
34 Application->ShowException (&exception);
36 catch (const CORBA::Exception &exception)
38 ShowMessage (String ("CORBA exception: ") + exception._rep_id ());
40 catch (...)
42 ShowMessage ("Unknown exception");
45 return 0;
47 //---------------------------------------------------------------------------