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@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@16=InternetReadFile
   _InternetCloseHandle@4=InternetCloseHandle
   _HttpQueryInfoA@20=HttpQueryInfoA
   _HttpSendRequestA@20=HttpSendRequestA
   _HttpOpenRequestA@32=HttpOpenRequestA
   _InternetConnectA@32=InternetConnectA
   _InternetCrackUrlA@16=InternetCrackUrlA
   _InternetOpenA@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...

Attachment: signature.asc
Description: PGP signature

Reply via email to