I'm getting hard crashes when I use a registry check against the default browser. The program will request the default browser (in this case, Opera), open the browser correctly, and display the page. Mozilla/Netscape/IE work fine, but in the case of Opera, I get a infinitely repeatable crash as soon as the page is done loading.

I've traced the bug to something within the Windows registry.
A description and workaround is below.

 a) Downloaded Opera 5.12 for Windows.
 b) Opened it up, set it as the default browser.
    That was the only configuration change.
 c) Ran my program using the following code:

      use Win32::API;
      my $ShellExecute = new Win32::API("shell32", "ShellExecuteA",
                         ['N','P', 'P', 'P', 'P', 'I'], 'N');
      $ShellExecute->Call(0, "open", $url, 0, 0, 1);

 d) Opera opened up, displayed the main page, and program crashes.

Ok. Hmf.

 c) Ran my program using the following code:

      system("c:\progra~1\opera\opera.exe $url");

Opera opened up, displayed the main page, and birds sing.
The question is: why? And is there a workaround? Does the $ShellExecute call return the path to the browser? Can I do something like:

      use Win32::API;
      my $ShellExecute = new Win32::API("shell32", "ShellExecuteA",
                         ['N','P', 'P', 'P', 'P', 'I'], 'N');

      # pseudo code below
      if ($ShellExecute->Path =~ /Opera/i) {
         system("$ShellExecute->Path  $url");
      } else { $ShellExecute->Call(0, "open", $url, 0, 0, 1); }

Is something like that possible?


--
Morbus Iff ( .sig on other machine. )
http://www.disobey.com/ && http://www.gamegrene.com/
"where's there's a will, there's a morbus ready to collect!"


Reply via email to