View Single Post
  #2 (permalink)  
Old 10th May 2012
Xetamus Xetamus is offline
Junior Member
BS.Player Newbie
 
Join Date: May 2012
Age: 35
Posts: 1
Rep Power: 0
Xetamus is on a distinguished road
Default

I know this is a super old file, but I have been racking my brain over this for a few days. I have been trying to get GetFileName to work with Perl and I cannot do it for the life of me.

I referenced this site: Snarl with Perl on Microsoft Windows which had done something similar, but still to no avail.

Here is my current code, it returns a 1 from the SendMessage command but I can't actually pull the filename from anywhere:

Quote:
my $cmd = Win32::GUI::GetActiveWindow();
my $buf = pack('a260');
my $cds = pack('L2P', BSP_GetFileNameW(), 4, $buf);
my $file_name = Win32::GUI::SendMessage($bsp_hand, $WM_COPYDATA, $cmd, $cds);
I'm running Win7 x64 and ActivePerl 5.14.2 (x86) and I'm beginning to suspect the difference in 32 and 64 bit may be causing some problems too. Any help anyone could provide would be awesome, thanks!
Reply With Quote
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20