Click to See Complete Forum and Search --> : CSocket Gives Assertion Failure???? Pl. Help..


bsmanoj
April 1st, 1999, 11:31 AM
Hi all,

I have used CSocket in my application.

Derived a class from CSocket like this

class MySocket : pubic CSocket

{

...

...

};

MySocket mySocket;

Created, SocketOpt is set successfully.

The object of this class is instantiated by the application main thread.

but I needed to use another thread to call the ReceiveFrom member of this class.

but when the thread calls ReceiveFrom(); VC++5.0 gives Assertion Failure, with reason that .m_hSocketWindow is null.

how this is happening?

Any way out of this?, I can't use the main thread for receiving it.

Why CSocket requires a Window handle?.

thanks in advance

bsmanoj