36#define CONSTRUCT_NTDLLFCT(x) x(TEXT("NTDLL"), #x)
123 L"Directory",
L"SymbolicLink",
124 L"Mutant",
L"Section",
L"Event",
L"Semaphore",
125 L"Timer",
L"Key",
L"EventPair",
L"IoCompletion",
126 L"Device",
L"File",
L"Controller",
L"Profile",
127 L"Type",
L"Desktop",
L"WindowStatiom",
L"Driver",
128 L"Token",
L"Process",
L"Thread",
L"Adapter",
L"Port",
162 DWORD ioStatusBlock[2];
175 CONTEXT(
"NtObjDirectory::read_directory()");
230 if (
info->name.string_ptr) {
231 info->name.string_ptr[
info->name.string_len /
sizeof(
WCHAR)] = 0;
233 TCHAR empty_string_ptr[] =
_T(
"");
234 info->name.string_ptr = empty_string_ptr;
236 if (
info->type.string_ptr) {
237 info->type.string_ptr[
info->type.string_len /
sizeof(
WCHAR)] = 0;
239 TCHAR empty_string_ptr[] =
_T(
"");
240 info->type.string_ptr = empty_string_ptr;
247 lstrcpyn(w32fd.cFileName,
p,
sizeof(w32fd.cFileName) /
sizeof(0[w32fd.cFileName]));
252 for(; *tname; tname++)
268 if (*w32fd.cFileName>=
'A' &&*w32fd.cFileName<=
'Z' && w32fd.cFileName[1]==
':')
302 memcpy(&w32fd.ftCreationTime, &
object.creation_time,
sizeof(
FILETIME));
305 entry->_bhfi.nNumberOfLinks =
object.reference_count - 1;
306 entry->_bhfi_valid =
true;
373 q =
entry->_data.cAlternateFileName;
#define ERROR_INVALID_FUNCTION
#define WideCharToMultiByte
#define ATTRIBUTE_SYMBOLIC_LINK
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble GLdouble q
GLuint GLint GLboolean GLint GLenum access
GLubyte GLubyte GLubyte GLubyte w
#define memcpy(s1, s2, n)
#define wcsncpy_s(d, l, s, n)
#define FILE_LIST_DIRECTORY
#define FILE_SHARE_DELETE
#define STANDARD_RIGHTS_READ
#define FILE_ATTRIBUTE_DIRECTORY
static DWORD NtOpenObject(OBJECT_TYPE type, PHANDLE phandle, DWORD access, LPCWSTR path)
static DWORD NtOpenObject(OBJECT_TYPE type, HANDLE *phandle, DWORD access, LPCWSTR path)
DWORD(__stdcall * NTOBJECTOPENFUNCTIONS)(HANDLE *, DWORD, OpenStruct *)
#define CONSTRUCT_NTDLLFCT(x)
_Check_return_ _CRTIMP wchar_t *__cdecl _wcsdup(_In_z_ const wchar_t *_Str)
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
base of all file and directory entries
bool get_path_base(PTSTR path, size_t path_count, ENTRY_TYPE etype) const
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, OpenStruct *)> NtOpenTimer
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, OpenStruct *)> NtOpenSemaphore
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, OpenStruct *)> NtOpenEvent
DynamicFct< DWORD(__stdcall *)(RtlUnicodeString *)> RtlFreeUnicodeString
DynamicFct< DWORD(__stdcall *)(HANDLE, NtObjectInfo *, DWORD size, BOOL, BOOL, void *, void *)> NtQueryDirectoryObject
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, OpenStruct *)> NtOpenProcess
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, OpenStruct *)> NtOpenSymbolicLinkObject
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, OpenStruct *)> NtOpenKey
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, OpenStruct *)> NtOpenIoCompletion
DynamicFct< DWORD(__stdcall *)(HANDLE)> NtClose
DynamicFct< void(__stdcall *)(RtlUnicodeString *, LPCWSTR)> RtlInitUnicodeString
DynamicFct< DWORD(__stdcall *)(RtlAnsiString *, const RtlUnicodeString *, BOOL)> RtlUnicodeStringToAnsiString
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, OpenStruct *)> NtOpenMutant
static const LPCWSTR s_ObjectTypes[]
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, OpenStruct *)> NtOpenThread
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, OpenStruct *)> NtOpenSection
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, OpenStruct *)> NtOpenDirectoryObject
DynamicFct< void(__stdcall *)(RtlAnsiString *, LPCSTR)> RtlInitAnsiString
DynamicFct< DWORD(__stdcall *)(RtlUnicodeString *, const RtlAnsiString *, BOOL)> RtlAnsiStringToUnicodeString
DynamicFct< DWORD(__stdcall *)(HANDLE, DWORD, NtObject *, DWORD size, DWORD *read)> NtQueryObject
DynamicFct< DWORD(__stdcall *)(HANDLE, RtlUnicodeString *, DWORD *)> NtQuerySymbolicLinkObject
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, OpenStruct *)> NtOpenEventPair
NTOBJECTOPENFUNCTIONS _ObjectOpenFunctions[23]
DynamicFct< DWORD(__stdcall *)(RtlAnsiString *)> RtlFreeAnsiString
DynamicFct< DWORD(__stdcall *)(HANDLE *, DWORD, void *, DWORD *, DWORD, OpenStruct *)> NtOpenFile
NtObj file system directory-entry.
virtual Entry * find_entry(const void *)
virtual void read_directory(int scan_flags=0)
NtObj file system file-entry.
virtual bool get_path(PTSTR path, size_t path_count) const
virtual BOOL launch_entry(HWND hwnd, UINT nCmdShow)
UnicodeString(size_t len, LPWSTR buffer)
UnicodeString(LPCWSTR str)
Windows file system directory-entry.