Skip to content

Commit 9557b0d

Browse files
committed
fixup??? fscache: teach fscache to use NtQueryDirectoryFile
Sadly, we include too many variants of too many header files that all define `UNICODE_STRING`: `winternl.h`, `NTSecAPI.h`, `ntdef.h`. We tried to define `UNICODE_STRING` so that we can declare `NtQueryDirectory()` with a minimal set of type definitions. But this causes compile errors, now that we need to have `RtlGenRandom` declared. Let's guard it a bit more. While at it, adjust the definition to match the one in mingw-w64's headers. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent c67a3c2 commit 9557b0d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compat/win32/ntifs.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
typedef _Return_type_success_(return >= 0) LONG NTSTATUS;
1010
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
1111

12+
#if !defined(_NTSECAPI_) && !defined(_WINTERNL_) && \
13+
!defined(__UNICODE_STRING_DEFINED)
14+
#define __UNICODE_STRING_DEFINED
1215
typedef struct _UNICODE_STRING {
1316
USHORT Length;
1417
USHORT MaximumLength;
15-
#ifdef MIDL_PASS
16-
[size_is(MaximumLength / 2), length_is((Length) / 2)] USHORT * Buffer;
17-
#else // MIDL_PASS
18-
_Field_size_bytes_part_(MaximumLength, Length) PWCH Buffer;
19-
#endif // MIDL_PASS
18+
PWSTR Buffer;
2019
} UNICODE_STRING;
2120
typedef UNICODE_STRING *PUNICODE_STRING;
2221
typedef const UNICODE_STRING *PCUNICODE_STRING;
22+
#endif /* !_NTSECAPI_ && !_WINTERNL_ && !__UNICODE_STRING_DEFINED */
2323

2424
typedef enum _FILE_INFORMATION_CLASS {
2525
FileDirectoryInformation = 1,

0 commit comments

Comments
 (0)