in reply to Re^3: How to create a File Handle Struct with Win32::API::Struct
in thread How to create a File Handle Struct with Win32::API::Struct
Yes, i know, this's outside of my territory
Leave me explain a bit more
I need open a file through the dll, so i do:
use Win32::API; use Win32::API::Struct; Win32::API::Struct->typedef( 'MYHANDLE', qw( LPCTSTR lpFileName; DWORD dwDesiredAccess; DWORD dwShareMode; LPSECURITY_ATTRIBUTES lpSecurityAttributes; DWORD dwCreationDisposition; DWORD dwFlagsAndAttributes; HANDLE hTemplateFile; )); my $handle = Win32::API::Struct->new( 'MYHANDLE' ); my $filename = './catalog.db'; my $dll = Win32::API->new( 'db.dll', 'OpenBlockFile','PS' ) or die $!; $dll->Call($filename, $handle) or die $!;
But in this's case the dll fill the struct with the associate resource or making this, the struct never would be a handle?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to create a File Handle Struct with Win32::API::Struct
by ikegami (Patriarch) on Dec 24, 2009 at 23:37 UTC |