Use this not this: APIs that changed for Vista and later
The recommendations this week have come in from the support team and the following list is things that aren't recommend for targeting versions of Windows later than Vista but that developers occasionally will use.
Internet Connection Sharing APIs
Don't use the Internet Connection Sharing APIs in versions of Windows later than Vista. The APIs do not work as documented.
WSARecv / SetSystemTimeAdjustment
After Windows Vista, the following APIs have changed and can confuse folks:
API | Notes |
---|---|
WSARecv | After Windows Vista, the value lpNumberOfBytesRecvd may be incorrect when used with IOCP. Not quite the best use this not this, but, if you are doing HTTP (e.g. REST) with C++, you should be using the WinHTTP API. |
SetSystemTimeAdjustment | After Windows Vista, this API will ignore any adjustments less than 15. The following KB article helps explain when SetSystemTimeAdjustment doesn't work in Vista and later. |
FindFirstVolumeMountPoint and VolumeMountPaths API
FindFirstVolumeMountPoint has some security limitations so some people recommend using the GetVolumePathName function instead which is more robust.
See Also