gorac has asked for the wisdom of the Perl Monks concerning the following question:
. Error Message: Perl Command Line Interpreter has encountered a problem and needs to close. We are sorry for the inconvenience.InternetSetOption(NULL, INTERNET_OPTION_REFRESH , NULL, 0);
use Win32::Registry; use Win32::API::Prototype; my $infile = "c:\\proxies.txt"; open (PFILE, $infile) || die "cannot Open $infile: $!"; my @proxies = (<PFILE>); my $proxy; foreach $proxy (@proxies){ my $Register = "Software\\Microsoft\\Windows\\CurrentVersion\\In +ternet Settings"; my $hkey; $HKEY_CURRENT_USER->Open($Register,$hkey)|| die $!; undef $garbage; $hkey->SetValueEx("ProxyServer",$garbage,REG_SZ,$proxy); $hkey->Close(); print "Current: $proxy\n"; ApiLink( "wininet", "BOOL InternetSetOption( HINTERNET hInternet, DWORD dwOption, LPVOID lpBuffer, DWORD dwBufferLength )" ) || die; InternetSetOption(NULL, INTERNET_OPTION_REFRESH , NULL, 0); sleep(30); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::API::Prototype error
by ikegami (Patriarch) on Sep 22, 2004 at 17:55 UTC |