windows wininet library
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Feb 1 00:37:23 PST 2015
On Sun, 01 Feb 2015 07:32:05 +0000, 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...
so far i solved the problem by using this manually created "wininet.def"
file:
LIBRARY wininet
EXPORTS
_InternetReadFile at 16=InternetReadFile
_InternetCloseHandle at 4=InternetCloseHandle
_HttpQueryInfoA at 20=HttpQueryInfoA
_HttpSendRequestA at 20=HttpSendRequestA
_HttpOpenRequestA at 32=HttpOpenRequestA
_InternetConnectA at 32=InternetConnectA
_InternetCrackUrlA at 16=InternetCrackUrlA
_InternetOpenA at 20=InternetOpenA
seems that my idea of using D to write a simple windows utility was very
wrong. ok, another attempt to use D for our windows developement has
failed. i'm in no way can sell manual ".def" creation to our team -- they
will make fun of me, showing how their Visual C can compile this code
without any troubles and external utilities...
-------------- 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/d65f38ab/attachment.sig>
More information about the Digitalmars-d-learn
mailing list