Well it looks like you are trying to use start() in a single threaded=20
application. (I'm guessing this was the source of your earlier linking=20=
issues). Unless you switch to multithreaded, you cannot use the start=20=
call since it always creates a new thread. What you will probably want=20=
to do is use the poll() method instead. You should call this during=20
your idle loop processing, or on a short timout interval (10-100ms).
--oren
On Aug 6, 2004, at 12:11 PM, Nico J=FCrs wrote:
> Hi all,
>
> =A0
>
> could anyone tell me how to integrate the SocketAcceptor into a MFC=20
> VC++ 6 application?
>
> Currently im doing the following calls in the initinstance() method of=20=
> my CWinAPP derived class:
>
> =A0
>
> try
>
> {
>
> FIX::SessionSettings settings( "setup.cfg" );
>
> FixIfc fixIfc;=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
// My QF Application derived class ...
>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 FIX::FileStoreFactory factory( =
settings );
>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 FIX::ScreenLogFactory logFactory( =
true, true, true );
>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 FIX::SocketAcceptor acceptor( =
fixIfc, factory, settings,=20
> logFactory );
>
> =A0
>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acceptor.start();
>
> }
>
> catch ( std::exception & e )
>
> {
>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 AfxMessageBox( e.what() );
>
> }
>
> =A0
>
> while executing start() i get the following error:
>
> =A0
>
> R6025 =96 pure virtual function call
>
> =A0
>
> When debugging the application i can see the following stack:
>
> _NMSG_WRITE(int 25) line 221
>
> _amsg_exit(int 25) line 324 + 9 bytes
>
> _purecall() line 35 + 7 bytes
>
> FIX::Acceptor::startThread(void * 0x0012fd8c) line 208 + 13 bytes
>
> _threadstartex(void * 0x00c51fd8) line 212 + 13 bytes
>
> KERNEL32! 77e5d33b()
>
> =A0
>
> Using block() instead of start() works (the connection gets=20
> established and i see my add appears in banzai =E0 also the =
application=20
> itself can=92t be used anymore).
>
> =A0
>
> Or , does anyone knows a way to integrate the QF acceptor into the MFC=20=
> Main Loop or get the Socket Connections running with MFC?
>
> =A0
>
> =A0
>
> Thanks,
>
> Nico
|