See Also:

Gus Class's Windows Developer Education Blog

Use this not this: APIs that changed for Vista and later

Use this not this: APIs that changed for Vista and later

  • Comments 2

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:

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

Leave a Comment
  • Please add 1 and 3 and type the answer here:
  • Post
  • Can you clarify what the problem is with FindFirstVolumeMountPoint? I'm not seeing anything specifically called out in the MSDN article..

  • @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.

Page 1 of 1 (2 items)