Re: CSocket, DLL and OnReceive never being called



"sc" <a_quarius3-google@xxxxxxxx> wrote in message
news:1142964059.981773.34840@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
'Allo!

I am writing a regular DLL (using shared MFC) that works with CSockets.
This DLL is loaded by a service that has no message pump.

I created a UI thread (derived from CWinThread) and all socket-related
work is done from here. I can connect to the server, send messages,
etc. The problem is that OnReceive is never called on my socket.

Does anyone have an idea what might be the problem?

Thanks in advance!
Sandra


I'm not certain, but CSocket would not ever call OnReceive since CSocket is
intended to mimic a blocking, synchronous socket.

Try CAsyncSocket instead.


.



Relevant Pages

  • Re: CAsyncSocket in a DLL, frequent crashes on close in DetachHandle
    ... doesn't have a message pump, so my socket was disfunctional - receiving ... my next step was to create and use the CSocket from a separate UI ... that the 'listener' therad was killed before I tried ...
    (microsoft.public.vc.mfc)
  • Re: How to make a CSocket console app using VC6 appwizard
    ... >> It's my understanding that CSocket needs a message pump only if the ... It's true that CSocket is inherently an asynchronous socket, ... int CSocket::Receive ...
    (microsoft.public.vc.mfc)
  • Re: CSocket, DLL and OnReceive never being called
    ... I am writing a regular DLL that works with CSockets. ... The problem is that OnReceive is never called on my socket. ... but CSocket would not ever call OnReceive since CSocket is ... Make sure that your code returns to the CWinThread message pump. ...
    (microsoft.public.vc.mfc)
  • CSocket, DLL and OnReceive never being called
    ... I am writing a regular DLL that works with CSockets. ... This DLL is loaded by a service that has no message pump. ... The problem is that OnReceive is never called on my socket. ...
    (microsoft.public.vc.mfc)
  • Re: Bug with Socket
    ... replace the following functions in MSocketSupport and CSocket. ... are you ignoring any specific socket errors? ... Dim strTemp As String ... Winsock API function ...
    (microsoft.public.vb.bugs)

Loading