The following message/fix i received from Mike Blazer.
He had some problems to post it to the Win32-GUI list.

****
Hello guys,
that was my old bug (that made no problems before Perl 5.6) -
please update your BrowseForFolder function with this one:

sub BrowseForFolder {
#=======================
   my ($hwndOwner, $pidlRoot, $pszDisplayName,
       $lpszTitle, $nFolder, $ulFlags,
       $lpfn, $lParam, $iImage, $pszPath)
      =
      (GetWindowHandle(), "\0"x260, "\0"x260,
       shift() || "\0", shift(), shift() | 0x0000,
       0, 0, 0, "\0"x260);

   $nFolder = CSIDL_DRIVES() unless defined $nFolder;

   $Win32::FileOp::SHGetSpecialFolderLocation->Call($hwndOwner, $nFolder,
$pidlRoot)
   and return undef;
   $pidlRoot = hex unpack 'H*',(join'', reverse split//, $pidlRoot);

   my $browseinfo = pack 'LLppILLI',
      ($hwndOwner, $pidlRoot, $pszDisplayName, $lpszTitle,
       $ulFlags, $lpfn, $lParam, $iImage);

   my $bool = $Win32::FileOp::SHGetPathFromIDList->Call(
               $Win32::FileOp::SHBrowseForFolder->Call($browseinfo),
               $pszPath
              );

   $pszPath =~ s/\0.*$//s;
   $bool ? $pszPath : undef;
}

and change this line
my $SleepEx = new Win32::API("kernel32", "Sleep", ['N','I'],'V');

to be
my $SleepEx = new Win32::API("kernel32", "SleepEx", ['N','I'],'V');

This fixes everything.

Sorry, Jenda is in the army and I can't upload a new version of
Win32::FileOp. Hopefully Jenda will be back
soon.

Best regards!

[EMAIL PROTECTED] wrote:

****

Regards, Grendi

Reply via email to