Why to use WSAGetLastError instead of GetLastError?

Himanshu Singh 1 Reputation point
2022-03-08T08:00:28.467+00:00

On Windows WSAGetLastError and GetLastError both the api are giving same values.

180915-image.png

So , Can I use GetLastError() api instead of WSAGetLastError()?

Is there any benefit we will get if we use WSAGetLastError instead of GetLastError

Windows development Windows API - Win32
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 90,681 Reputation points
    2022-03-08T08:36:20.13+00:00

    WSAGetLastError just calls GetLastError in Ws2_32.dll


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.