On Sun, 01 Feb 2015 08:10:30 +0000, Jeremy DeHaan wrote: > On Sunday, 1 February 2015 at 07:32:05 UTC, ketmar wrote: >> how can i use wininet.dll from D? i got bindings from >> https://github.com/ >> CS-svnmirror/dsource-bindings-win32.git, and then i tried to create >> wininet.lib with implib.exe from DMC package. no matter how i tried, >> the resulting "wininet.lib" seems to not work, as linker keep >> complaining about missing symbols like "_InternetReadFile@16" and so >> on. >> >> i'm building for win32. >> >> ah, and yep, i compiled "wininet.lib" to "lib" dir, and added option to >> dmd.exe: "-L+wininet.lib". >> >> i assume that i have to create corrent .def file to remap all the >> names, >> am i right? oh, delightful... > > What does your implib command look like?
i tried all possible variants -- both "/noi" and "/s", one of them and nothing at all. neither of variants works. the thing is `extern(Windows)` ignores even `pragma(mangle)`, and insisting on names like "_InternetReadFile@16". note the "@16" here -- this is the total size of arguments to `InternetReadFile()`. "wininet.dll" has names without that sizes, so -- no luck. "implib" can't determine the sizes by itself too. so there seems to be no way to create correct library without manually writing ".def" file for it. p.s. i don't know why `extern(Windows)` ignores `pragma(mangle)`.
signature.asc
Description: PGP signature