in reply to Re^4: How to create a File Handle Struct with Win32::API::Struct
in thread How to create a File Handle Struct with Win32::API::Struct
Are you getting a HANDLE or a struct? You keep saying handle, but you keep using a struct.
What's the signature of the DLL function? Is it
If so, you need something likevoid __stdcall OpenBlockFile( const char* szFileName, /* Input */ HANDLE* pHandle /* Output */ )
my $dll = Win32::API->new( 'db.dll', 'OpenBlockFile', 'PP', 'V' ) or die $^E; my $packed_handle = pack('L', 0); $dll->Call($filename, $packed_handle); $handle = unpack('L', $packed_handle);
|
|---|