Today unfortunately I have discovered that WinINet calls don’t work in a service.
I need to put a file with FTP somewhere and call than a URL with http to update the data.
Microsoft says that instead of WinINet in a service the WinHTTP functions should be used. Unfortunately, WinHTTP has no support for FTP, so you need to use a 3rd party library in a Win32 service. (I used FCE from Marshallsoft).
And then: the WinHTTP interface is much more complicated to call than WinINET, and after working for a while on the WinHTTP interface (unfortunately it is not implemented in Visual Objects) I decided to use an external call to cURL.