|As per the documentation, this function will return, either of the following values,
S_OK - 0
E_OUTOFMEMORY - 0x80000002
INET_E_DOWNLOAD_FAILURE - 0x800C0008
and from the error code you've given the value is negative which means that you're taking this values to a signed variable like int.
The actual return type is HRESULT and the values are defined with unsigned hexadecimal. Please compare it with INET_E_DOWNLOAD_FAILURE, S_OK or E_OUTOFMEMORY to know whether it has succeeded or not.
The error code you've given is close to INET_E_DOWNLOAD_FAILURE value. Please compare against it.
"Great hopes make everything great possible" - Benjamin Franklin