C:\test>\AS817\perl\bin\perl5.8.8.exe -Mlib=\perl\site\lib -MWin32::API -mstrict -w Win32::API->Import( 'urlmon', 'URLDownloadToFile', 'PPPNP', 'N', ); my $pCaller = 0; my $szURL = 'http://somedomain.com/pic.jpg'; my $szFileName = 'c:\1img.jpg'; my $dwReserved = 8; # Download from offline cache my $lpfnCB = 0; my $res = URLDownloadToFile( undef, $szURL, $szFileName, $dwReserved, undef, ) or die Win32::FormatMessage(Win32::GetLastError); ^Z Use of uninitialized value in subroutine entry at (eval 2) line 2, line 164. Use of uninitialized value in subroutine entry at (eval 2) line 2, line 164. #### C:\test>perl -Mlib=\perl\site\lib -MWin32::API -mstrict -w Win32::API->Import( 'urlmon', 'URLDownloadToFile', 'PPPNP', 'N', ); printf "%08x\n", URLDownloadToFile( 0, 'http://images.google.com/intl/en/images/images_res.gif', 'google.gif', 8, 0, ) or die $^E; ^Z 800c0005 #### The following codes are other common error codes: - 80100003. During install, one or more files are missing from download folder. - 800bxxxx. Anything starting with 800b is a trust failure (for example, 800b010b - trust check failed). - 800Cxxxx. Anything starting with 800C is a Urlmon failure (for example, 800C0005 - file or server not found, 800C000B - connection timeout). - 80040004. User canceled.