Use WSAGetLastError() with FormatMessage() ?

  • Thread starter Thread starter Polaris
  • Start date Start date
P

Polaris

Hi:

Can the error code returned by WSAGetLastError() be used in
FormatMessage(...) to get a text description of the error ?

Thanks in Advance !

Polaris
 
Yes, but don't forget to call WSAStartup at the beginning of your code (and check that it succeeds) or you'll just be getting
rubbish back from WSAGetLastError()

Steve Duff, MCSE, MVP
Ergodic Systems, Inc.
 
Back
Top