Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Thanks to @Taylor and @Olli I fully revised my question.

Hi,

I'm developing a windows application in ubuntu. Everything is fine. The only problem is that every web call I perform with wininet.dll is sent to localhost instead of target server.

I have no idea what's the problem and how to force wininet.dll to resolve domain name correctly.

I also created the hosts file in ~/.wine/drive_c/windows/system32/drivers/etc/hosts and set domains and IPs manually; but did not help.

Any idea?

share|improve this question

2 Answers 2

You can use /etc/hosts to do same thing. Format is at least almost the same, and there is examples in that file already in place.

share|improve this answer
    
If you mean the Ubuntu's /etc/hosts I should say it does not apply on the application running by Wine. Here is the problem. –  Alexar Feb 17 '11 at 18:05
    
@takpar: that's weird, because in my Debian it works without any problem. Clearly YMMV. –  Olli Feb 17 '11 at 18:07
    
you were right. my problem was from somewhere else. –  Alexar Feb 17 '11 at 18:29
    
@takpar: nice, hopefully either answer will provide you a solution. Winetricks approach is better, if you do not want same entries for your Linux applications. –  Olli Feb 17 '11 at 18:31

apt://Winetricks has an option to create an empty hosts file in your wine directory, which you can then edit in the same manner.

You could try the wininet.dll from windows. I believe there is a copy on dllfiles.com (not sure if this link is correct since I am calling from memory). In wine, you will have to set the dll to native then builtin (and remember to create a backup of wine's copy of the dll before installing).

share|improve this answer
    
you mean I should just create a hosts file in the same structure and it will do the job? –  Alexar Feb 17 '11 at 18:14
    
essentially yes. Winetricks can do that for you, and it is best if you let it do that for you :) –  RolandiXor Feb 17 '11 at 18:20
1  
+1 for introduce winetricks. (the link you provided is corrupted. please fix it.) –  Alexar Feb 17 '11 at 18:30
    
kk I tried to use aptlink :P but I'm on firefox 4 lol (works fine on chromium). –  RolandiXor Feb 17 '11 at 18:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.