im using UrlDownloadtofile() to download some files ...but the issue is if the file is present im able to download file(With return value S_OK) ...but if the server is not accessible ie (some issue with IIS or any other..) or if the file is not present im not getting the exact return value from UrlDownloadtofile to specify to user whether it is server issue or File not present...in MSDN it was given that if the return value is INET_E_DOWNLOAD_FAILURE then file is not present in the server but...im getting some junk value like -2146697210...when the file is not present in the server or server is not accessible....
So please let me know how can i notify user what is the exact problem....
"The GetActiveWindow function retrieves the window handle to the active window attached to the calling thread's message queue." . So i am getting NULL when my application's window is not the current window.
1.Passing by parameter ensures, you don't create multiple copies.
2.As you don't make copies, it saves memory and be faster.
3.When you change something to the reference, it would mean you are changing the actual object. So serves the purpose.
4. The same can be done using pointers, but reference are better in many ways. The major advantage is that you dont need to check for NULL every time.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus