[SOLVED]When using URLMon/Lazarus I get error message!!! lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Robert W.B. · 2013-01-22 20:14 Hi Lazarus friends. When I use UrlMon i get message " Access Denied" all the time but sometimes in the night it works without error messages! I know the server I pick data from is busy sometimes and I think Lazarus show this message(and Delphi are not), because there is a delay,when I pick the data from the server. Is there a way to let Lazarus networking more less sensitive to this error message? ex: Allow the Urlmon to wait a minute ,to prevent Access denied? Anyone know how, to prevent access denied?  Solution: Everytime a new url was picked and a new file was saved,I have to delete the old file before pick a new url. DeleteFile(myFile); ---------------------------------------------------------------------- wjackson153 · 2013-01-23 03:58 Post your code so we can see whats going on ? ---------------------------------------------------------------------- Robert W.B. · 2013-01-31 02:02 I get access denied all the time in Lazarus but not in Delphi! It works in Delphi but,not in Lazarus? Can it be an utf8 problem? I also url download from a https server. Delphi has a file called Urlmon.dcu but,in Lazarus i use Urlmon.dll with this code. function URLDownloadToFile(pCaller: pointer; URL: PChar; FileName: PChar; Reserved: DWORD; lpfnCB : pointer): HResult; stdcall; external 'urlmon.dll' name 'URLDownloadToFileA'; Why do I get access denied in Lazarus and not in Delphi with same code? ---------------------------------------------------------------------- Robert W.B. · 2013-01-31 02:50 I got this error message also when using urlmon.dll. My program raised exeption class 'RunError(5)' Can anyone explain this for me? regards