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
Anonymous
July 29, 2011
Can you clarify what the problem is with FindFirstVolumeMountPoint? I'm not seeing anything specifically called out in the MSDN article..Anonymous
August 01, 2011
@Ian, the short version of the issue you may encounter with FindFirstVolumeMountPoint is that unless you have a superuser account and permissions to the share, the mount point will not show up in the list. Your enumerated lists of mount points can be incomplete and you will not know when listed folders require permissions.