mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-24 15:29:29 +02:00

* fix DirectoryExists which didn't yet work without System privileges * fix FileExists which didn't use the correct access flags + implement FindFirst/FindNext/FindClose which is conceptually based on the Find-mechanism of the Unix RTL as for the object hierarchy I can't use the same mechanism that Windows provides for filesystems (the function NtQueryDirectoryFile provides the possibility to pass a pattern, but I'm not using that functionality; maybe I'll update FindNext in the future to use this for speed up...). Note: The PChar "workaround" is needed, because string reallocation does currently not work... (maybe Reallocmem is buggy) - remove FindMatch which is only provided by Windows SysUtils and DOS units + add functions/constants/types which are used by Find* to the NDK includes - remove "packed" from file information types (Windows 7 didn't like the size otherwise) git-svn-id: trunk@21438 -
75 lines
2.3 KiB
PHP
75 lines
2.3 KiB
PHP
{%MainUnit ndk.pas}
|
|
{
|
|
Native Development Kit for Native NT
|
|
|
|
This file is part of the Free Pascal run time library.
|
|
This units contains some types and constants used by NT
|
|
Copyright (c) 2010 by Sven Barth
|
|
|
|
See the file COPYING.FPC, included in this distribution,
|
|
for details about the copyright.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
**********************************************************************}
|
|
|
|
type
|
|
WCHAR = WideChar;
|
|
PWSTR = PWideChar;
|
|
CCHAR = Byte;
|
|
PCCHAR = ^CCHAR;
|
|
|
|
const
|
|
NT_DELETE = $00010000;
|
|
NT_SYNCHRONIZE = $00100000;
|
|
|
|
GENERIC_READ = $80000000;
|
|
GENERIC_WRITE = $40000000;
|
|
GENERIC_EXECUTE = $20000000;
|
|
GENERIC_ALL = $10000000;
|
|
|
|
FILE_LIST_DIRECTORY = $00000001;
|
|
FILE_READ_DATA = $00000001;
|
|
FILE_ADD_FILE = $00000002;
|
|
FILE_WRITE_DATA = $00000002;
|
|
FILE_ADD_SUBDIRECTORY = $00000004;
|
|
FILE_APPEND_DATA = $00000004;
|
|
FILE_CREATE_PIPE_INSTANCE = $00000004;
|
|
FILE_READ_EA = $00000008;
|
|
FILE_READ_PROPERTIES = $00000008;
|
|
FILE_WRITE_EA = $00000010;
|
|
FILE_WRITE_PROPERTIES = $00000010;
|
|
FILE_EXECUTE = $00000020;
|
|
FILE_TRAVERSE = $00000020;
|
|
FILE_DELETE_CHILD = $00000040;
|
|
FILE_READ_ATTRIBUTES = $00000080;
|
|
FILE_WRITE_ATTRIBUTES = $00000100;
|
|
|
|
FILE_SHARE_READ = $00000001;
|
|
FILE_SHARE_WRITE = $00000002;
|
|
FILE_SHARE_DELETE = $00000004;
|
|
FILE_SHARE_VALID_FLAGS = $00000007;
|
|
|
|
FILE_ATTRIBUTE_READONLY = $00000001;
|
|
FILE_ATTRIBUTE_HIDDEN = $00000002;
|
|
FILE_ATTRIBUTE_SYSTEM = $00000004;
|
|
FILE_ATTRIBUTE_DIRECTORY = $00000010;
|
|
FILE_ATTRIBUTE_ARCHIVE = $00000020;
|
|
FILE_ATTRIBUTE_DEVICE = $00000040;
|
|
FILE_ATTRIBUTE_NORMAL = $00000080;
|
|
FILE_ATTRIBUTE_TEMPORARY = $00000100;
|
|
FILE_ATTRIBUTE_SPARSE_FILE = $00000200;
|
|
FILE_ATTRIBUTE_REPARSE_POINT = $00000400;
|
|
FILE_ATTRIBUTE_COMPRESSED = $00000800;
|
|
FILE_ATTRIBUTE_OFFLINE = $00001000;
|
|
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = $00002000;
|
|
FILE_ATTRIBUTE_ENCRYPTED = $00004000;
|
|
FILE_ATTRIBUTE_VALID_FLAGS = $00007fb7;
|
|
FILE_ATTRIBUTE_VALID_SET_FLAGS = $000031a7;
|
|
|
|
type
|
|
ACCESS_MASK = DWORD;
|
|
PACCESS_MASK = ^ACCESS_MASK;
|