in reply to Use Windows wimgapi dll
The first argument is a wide character string (LPWSTR), but you pass a Perl glob object. I imagine you'd need to pass the result of the following:
use Encode qw( encode ); encode('UCS-2le', 'C:\\data.wim')
Why do you open a file only to immediately close the handle?
I also wonder why you FileHandle is used over the simpler and safer open.
use FileHandle qw( ); my $fh = new FileHandle; $fh->open("< C:\\data.wim") or die;
vs
open(my $fh, "<", "C:\\data.wim") or die;
(Add use IO::Handle; if you want to use $fh like an object.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Use Windows wimgapi dll
by iea (Beadle) on Aug 04, 2008 at 06:52 UTC | |
by iea (Beadle) on Aug 04, 2008 at 07:48 UTC | |
by ikegami (Patriarch) on Aug 04, 2008 at 08:03 UTC | |
by iea (Beadle) on Aug 04, 2008 at 10:47 UTC | |
by Anonymous Monk on Aug 04, 2008 at 12:40 UTC | |
| |
by iea (Beadle) on Aug 04, 2008 at 11:33 UTC | |
|