windows wininet library
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Feb 1 00:24:45 PST 2015
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 at 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 at 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)`.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150201/feb7586f/attachment.sig>
More information about the Digitalmars-d-learn
mailing list