in reply to speak up Win32::API users

Like this

my $CopyFileW = Win32::API::Wide->new( 'Kernel32.dll', ' BOOL WINAPI CopyFileW( _In_ LPCTSTR lpExistingFileName, _In_ LPCTSTR lpNewFileName, _In_ BOOL bFailIfExists ); ', ); $CopyFileW->( $from, $to );

Win32::API::Wide knows to args through Encode::encode('UCS-2' ... or whatever "unicode" means to windows

See also http://search.cpan.org/~dcmertens/FFI-1.04_01/ and Design Issues for Foreign Function Interfaces

Replies are listed 'Best First'.
Re^2: speak up Win32::API users
by Anonymous Monk on May 14, 2012 at 20:48 UTC
    Win32::API::Wide should also probably complain (warn) if they're not given unicode strings because its probably a mistake
Re^2: speak up Win32::API users
by Anonymous Monk on May 15, 2012 at 10:51 UTC