DebugBreak in gethostbyName

  • Thread starter Thread starter Troy Anderson
  • Start date Start date
T

Troy Anderson

I am running with the latest QFE's for PB 4.2 and I keep getting a
DebugBreak in the call to gethostbyname when I invoke it using "ppp_peer" as
an argument and there is no PPP session. NOTE: I am doing this because my
application needs to determine when a PPP session is established. Any
clues to why the DebugBreak occurs; I cannot find source code for this to
see what may be the problem.

Thanks.
 
I can guess that there's a DebugBreak in the case where an unknown host is
passed so that someone at MS could check that case. Have you tried it with
another host name that might be unknown? Same result? If so, I'd just
ignore it and tell the debugger to keep going...

Paul T.
 
This leads to a new question. After looking at the debug output window
it appears that WSAStartup() needed to be invoked. So I placed a
WSAStartup in this thread and the DebugBreak never occured again.

One thing I do not understand is that I invoked WSAStartup in my main
thread at app startup well before my worker thread invoked
gethostbyname(). The MSDN does not say that WSAStartup() needs to be
invoked on every thread using Winsock APIs. Does this need to be done?
Or is the debug output incorrect?


Thanks
 
Back
Top