retep998 / winapi-rs

Rust bindings to Windows API
https://crates.io/crates/winapi
Apache License 2.0
1.85k stars 392 forks source link

http module needs httpapi.lib, not winhttp.lib #743

Open tom-bowles opened 5 years ago

tom-bowles commented 5 years ago

I think this line in build.rs:

("http", &["guiddef", "minwinbase", "minwindef", "sspi", "winnt", "ws2def"], &["winhttp"]),

should be:

("http", &["guiddef", "minwinbase", "minwindef", "sspi", "winnt", "ws2def"], &["httpapi"]),
jackyzy823 commented 5 years ago

When I try to use httpapi, I found this question too.

And another question is : https://github.com/retep998/winapi-rs/blob/f823e7e876d569aee316962ff7262c89f26c72df/src/um/http.rs#L853-L856

According to https://docs.microsoft.com/en-us/windows/win32/api/http/nf-http-httpcreatehttphandle

HTTPAPI_LINKAGE ULONG HttpCreateHttpHandle(
  OUT PHANDLE RequestQueueHandle,
  ULONG       Reserved
);

pReqQueueHandle shoud be PHANDLE not HANDLE

It is highly appreciated if you could fix these.Thanks