56 if (PNameInfo ==
NULL)
83 if (PNameInfo !=
NULL)
105 PWSTR PartialNamesList;
117 if (TotalEntries == 0)
124 PartialNamesList = NamesList;
126 while (
wcscmp(NameToFind, PartialNamesList) != 0)
144 Current = *PartialNamesList;
171 PWSTR TargetPathBuffer;
197 if (lpTargetPath !=
NULL)
207 TargetPathBuffer = TargetPathU.
Buffer;
211 TargetPathBuffer =
NULL;
218 if (TargetPathBuffer !=
NULL)
277 if (lpTargetPath ==
NULL)
296 WARN(
"RtlDosPathNameToNtPathName_U() failed\n");
310 if (CaptureBuffer ==
NULL)
332 if (NtTargetPathU.
Length != 0)
354 sizeof(*DefineDosDeviceRequest));
360 WARN(
"CsrClientCallServer() failed (Status %lx)\n", ApiMessage.
Status);
374 if (
Letter < 26 && !LUIDDeviceMapsEnabled)
381 BSM_ptr = (BSM_type)
GetProcAddress(hUser32,
"BroadcastSystemMessageW");
434 PWSTR DeviceNameBuffer, TargetPathBuffer;
437 if (lpDeviceName !=
NULL)
460 DeviceNameBuffer = DeviceNameU->
Buffer;
464 DeviceNameBuffer =
NULL;
469 if (TargetPathBuffer ==
NULL)
509 TargetPathU.
Length = CurrentLength *
sizeof(
WCHAR);
531 RtlFreeHeap(RtlGetProcessHeap(), 0, TargetPathBuffer);
572 WARN(
"NtOpenDirectoryObject() failed (Status %lx)\n",
Status);
580 if (lpDeviceName !=
NULL)
594 WARN(
"NtOpenSymbolicLinkObject() failed (Status %lx)\n",
Status);
616 WARN(
"NtQuerySymbolicLinkObject() failed (Status %lx)\n",
Status);
630 TRACE(
"Buffer is too small\n");
657 GlobalNeeded =
FALSE;
687 for (
i = 0;
i < 3; ++
i)
731 if (
RtlCompareMemory(&NullEntry, DirInfo,
sizeof(NullEntry)) ==
sizeof(NullEntry))
746 NameLength > ucchMax -
Length ||
757 Ptr += (NameLength + 1);
758 Length += (NameLength + 1);
827 WARN(
"NtOpenDirectoryObject() failed (Status %lx)\n",
Status);
836 for (
i = 0;
i < 3; ++
i)
883 if (
RtlCompareMemory(&NullEntry, DirInfo,
sizeof(NullEntry)) ==
sizeof(NullEntry))
911 NameLength > ucchMax -
Length ||
924 Ptr += (NameLength + 1);
925 Length += (NameLength + 1);
NTSTATUS NtQueryObject(IN HANDLE Handle, IN OBJECT_INFO_CLASS ObjectInformationClass, OUT PVOID ObjectInformation, IN ULONG ObjectInformationLength, OUT PULONG ReturnLength)
static const ENTRY Entries[]
static HANDLE DirectoryHandle
#define DEBUG_CHANNEL(args)
#define BASESRV_SERVERDLL_INDEX
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define CSR_CREATE_API_NUMBER(ServerId, ApiId)
#define DBT_DEVTYP_VOLUME
#define DBT_DEVICEARRIVAL
#define DBT_DEVICEREMOVECOMPLETE
struct _DEV_BROADCAST_VOLUME DEV_BROADCAST_VOLUME
#define ERROR_NOT_ENOUGH_MEMORY
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
PBASE_STATIC_SERVER_DATA BaseStaticServerData
DWORD WINAPI QueryDosDeviceA(LPCSTR lpDeviceName, LPSTR lpTargetPath, DWORD ucchMax)
BOOL WINAPI DefineDosDeviceA(DWORD dwFlags, LPCSTR lpDeviceName, LPCSTR lpTargetPath)
BOOL WINAPI DefineDosDeviceW(DWORD dwFlags, LPCWSTR lpDeviceName, LPCWSTR lpTargetPath)
DWORD FindSymbolicLinkEntry(PWSTR NameToFind, PWSTR NamesList, DWORD TotalEntries, PBOOLEAN Found)
NTSTATUS IsGlobalDeviceMap(HANDLE DirectoryHandle, PBOOLEAN IsGlobal)
DWORD WINAPI QueryDosDeviceW(LPCWSTR lpDeviceName, LPWSTR lpTargetPath, DWORD ucchMax)
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
#define RtlCompareMemory(s1, s2, l)
NTSTATUS RtlUpcaseUnicodeString(PUNICODE_STRING dst, PUNICODE_STRING src, BOOLEAN Alloc)
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
#define OBJ_CASE_INSENSITIVE
#define memcpy(s1, s2, n)
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI BOOLEAN NTAPI RtlDosPathNameToNtPathName_U(_In_opt_z_ PCWSTR DosPathName, _Out_ PUNICODE_STRING NtPathName, _Out_opt_ PCWSTR *NtFileNamePart, _Out_opt_ PRTL_RELATIVE_NAME_U DirectoryInfo)
WCHAR NTAPI RtlUpcaseUnicodeChar(_In_ WCHAR Source)
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
#define SYMBOLIC_LINK_QUERY
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define STATUS_NO_MORE_ENTRIES
NTSTATUS NTAPI NtOpenDirectoryObject(OUT PHANDLE DirectoryHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSTATUS NTAPI NtQueryDirectoryObject(IN HANDLE DirectoryHandle, OUT PVOID Buffer, IN ULONG BufferLength, IN BOOLEAN ReturnSingleEntry, IN BOOLEAN RestartScan, IN OUT PULONG Context, OUT PULONG ReturnLength OPTIONAL)
NTSTATUS NTAPI NtQuerySymbolicLinkObject(IN HANDLE LinkHandle, OUT PUNICODE_STRING LinkTarget, OUT PULONG ResultLength OPTIONAL)
NTSTATUS NTAPI NtOpenSymbolicLinkObject(OUT PHANDLE LinkHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
DWORD BaseSetLastNTError(IN NTSTATUS Status)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
PCSR_CAPTURE_BUFFER NTAPI CsrAllocateCaptureBuffer(_In_ ULONG ArgumentCount, _In_ ULONG BufferSize)
ULONG NTAPI CsrAllocateMessagePointer(_Inout_ PCSR_CAPTURE_BUFFER CaptureBuffer, _In_ ULONG MessageLength, _Out_ PVOID *CapturedData)
VOID NTAPI CsrFreeCaptureBuffer(_In_ _Frees_ptr_ PCSR_CAPTURE_BUFFER CaptureBuffer)
NTSTATUS NTAPI CsrClientCallServer(_Inout_ PCSR_API_MESSAGE ApiMessage, _Inout_opt_ PCSR_CAPTURE_BUFFER CaptureBuffer, _In_ CSR_API_NUMBER ApiNumber, _In_ ULONG DataLength)
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
BASE_DEFINE_DOS_DEVICE DefineDosDeviceRequest
union _BASE_API_MESSAGE::@3534 Data
UNICODE_STRING TargetPath
UNICODE_STRING DeviceName
BOOLEAN LUIDDeviceMapsEnabled
#define STATUS_INVALID_PARAMETER
#define STATUS_MORE_ENTRIES
#define STATUS_INFO_LENGTH_MISMATCH
#define STATUS_OBJECT_NAME_INVALID
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
#define DDD_NO_BROADCAST_SYSTEM
#define DDD_EXACT_MATCH_ON_REMOVE
#define DDD_RAW_TARGET_PATH
#define DDD_LUID_BROADCAST_DRIVE
#define DDD_REMOVE_DEFINITION
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define ERROR_FILENAME_EXCED_RANGE
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO