Skip to content

Windows: update the VS templates for iphlpapi linkage - #3943

Closed
compnerd wants to merge 1 commit into
curl:masterfrom
compnerd:visual-studio-projects-iphlpapi
Closed

compnerd wants to merge 1 commit into
curl:masterfrom
compnerd:visual-studio-projects-iphlpapi

Conversation

@compnerd

Copy link
Copy Markdown
Contributor

This modifies the Visual Studio templates to add the new iphlpapi
dependency on the libcurl build. This should fix the build of curl with
Visual Studio or MSBuild.

This modifies the Visual Studio templates to add the new `iphlpapi`
dependency on the libcurl build.  This should fix the build of curl with
Visual Studio or MSBuild.
@MarcelRaad

MarcelRaad commented May 26, 2019 •

Copy link
Copy Markdown
Member

I'm not too sure about the very old Visual Studio versions. The library is only needed when targeting Windows Vista and later, and IIRC the first Visual Studio version able to target Windows Vista was 2005.

I haven't found out what Windows versions ship Iphlpapi.dll, but Windows 98, the lowest version VS 2005 can target, should have it. So it should hopefully be safe to add it to the VS 2005 and later projects.

@compnerd

Copy link
Copy Markdown
Contributor Author

Windows XP is the oldest Windows to have iphlpapi support. @bagder mentioned that he believed that breaking older than XP was acceptable (since the use of the IP effectively disables those builds without changes).

@MarcelRaad

Copy link
Copy Markdown
Member

Microsoft docs say that some functions are even available with Windows 98:
https://docs.microsoft.com/en-us/windows/desktop/api/Iphlpapi/nf-iphlpapi-getnetworkparams

The GetNetworkParams function and the FIXED_INFO structure are supported on Windows 98and later.

@compnerd

Copy link
Copy Markdown
Contributor Author

Yes, some of the APIs like that (though not if_nameindex) are available if you have an old PSDK, but the current WinSDK won't let you target that far back.

@captain-caveman2k

Copy link
Copy Markdown
Contributor

Can we close this PR @compnerd given that we now link to if_nametoindex dynamically?

@compnerd

Copy link
Copy Markdown
Contributor Author

Yeah, this should no longer be needed with that.

@compnerd compnerd closed this May 30, 2019
@compnerd
compnerd deleted the visual-studio-projects-iphlpapi branch May 30, 2019 01:01
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants