You are using asynchronous mode (
). In this case, all functions will return immediately without waiting for the requested action to be finished. The error 997 /
indicates that such an action has not been finished yet.
With asynchronous operations, use the InternetSetStatusCallback
] function to be notified when operations has been finished. See also the Asynchronous Example Application
] in the MSDN.