05. $BACKUP_DATA = 0x00000001;
06. $BACKUP_ALTERNATE_DATA = 0x00000004;
07.
08. ApiLink( 'kernel32.dll',
09. 'HANDLE CreateFile( LPCTSTR pszPath,
10. DWORD dwAccess,
11. DWORD dwShareMode,
12. PVOID SecurityAttributes,
13. DWORD dwCreationDist,
14. DWORD dwFlags,
15. HANDLE hTemplate )' )
16. || die "Can not locate CreateFile()";
......
44. push( @Files, $Path ) if( -f $Path );
......
48. foreach my $File ( @Files )
49. {
50. print "$File\n";
51.
52. $hFile = CreateFile( $File,
53. $GENERIC_READ,
54. 0,
55. undef,
56. $OPEN_EXISTING,
57. $FILE_FLAG_BACKUP_SEMANTICS,
58. 0 ) || die "Can not open the file '$File'\n";
|
05. $BACKUP_DATA = 0x00000001;
06. $BACKUP_ALTERNATE_DATA = 0x00000004;
07. $FILE_SHARE_READ = 0x00000001;
08. $FILE_FLAG_BACKUP_SEMANTICS = 0x02000000;
09.
10. ApiLink( 'kernel32.dll',
11. 'HANDLE CreateFile( LPCTSTR pszPath,
12. DWORD dwAccess,
13. DWORD dwShareMode,
14. PVOID SecurityAttributes,
15. DWORD dwCreationDist,
16. DWORD dwFlags,
17. HANDLE hTemplate )' )
18. || die "Can not locate CreateFile()";
......
46. push( @Files, $Path ) if( -f $Path || -d $Path );
......
50. foreach my $File ( @Files )
51. {
52. print "$File\n";
53.
54. $hFile = CreateFile( $File,
55. $GENERIC_READ,
56. $FILE_SHARE_READ,
57. undef,
58. $OPEN_EXISTING,
59. $FILE_FLAG_BACKUP_SEMANTICS,
60. 0 ) || die "Can not open the file '$File'\n";
|