28 ULONG CurrentMntPt, FoundVolumeLen;
97 NtPathName.
Length = MountDevName.NameLength;
112 if (MountPoint ==
NULL)
127 if (MountPoints ==
NULL)
163 if (MountPoints ==
NULL)
196 FoundVolume = NtPathName.
Buffer;
197 FoundVolumeLen = NtPathName.
Length;
231 if (cchBufferLength *
sizeof(
WCHAR) < FoundVolumeLen + 2 *
sizeof(
WCHAR))
242 lpszVolumeName[1] =
L'\\';
244 lpszVolumeName[FoundVolumeLen /
sizeof(
WCHAR)] =
L'\\';
278 if (IsAMountPoint !=
NULL)
280 *IsAMountPoint =
FALSE;
284 if (lpszVolumeName !=
NULL && cchBufferLength >= 1)
293 if (IsAMountPoint !=
NULL)
295 *IsAMountPoint =
TRUE;
300 if (ReparseBuffer ==
NULL)
306 if (lpszVolumeName !=
NULL && cchBufferLength >= 1)
319 RtlFreeHeap(RtlGetProcessHeap(), 0, ReparseBuffer);
323 if (lpszVolumeName !=
NULL && cchBufferLength >= 1)
337 RtlFreeHeap(RtlGetProcessHeap(), 0, ReparseBuffer);
340 if (lpszVolumeName !=
NULL && cchBufferLength >= 1)
351 RtlFreeHeap(RtlGetProcessHeap(), 0, ReparseBuffer);
355 if (lpszVolumeName !=
NULL && cchBufferLength >= 1)
368 Old = lpszVolumeName[1];
370 lpszVolumeName[1] =
L'\\';
377 SubstituteName.
Buffer = lpszVolumeName;
380 RtlFreeHeap(RtlGetProcessHeap(), 0, ReparseBuffer);
389 lpszVolumeName[1] = Old;
407 if (IsAMountPoint !=
NULL)
419 if (lpszVolumeName !=
NULL && cchBufferLength >= 1)
436 if (MountPoint.
Buffer[1] !=
':')
441 else if (lpszVolumeName !=
NULL && cchBufferLength >= 1)
455 if (MountPoint.
Length == 14 && MountPoint.
Buffer[0] ==
'\\' && MountPoint.
Buffer[1] ==
'\\' &&
456 (MountPoint.
Buffer[2] ==
'.' || MountPoint.
Buffer[2] ==
'?') && MountPoint.
Buffer[3] ==
L'\\' &&
457 MountPoint.
Buffer[5] ==
':')
459 if (lpszVolumeName !=
NULL && cchBufferLength >= 1)
504 VolumeNameLength,
NULL);
529 if (VolumeMountPointU ==
NULL)
657 DWORD cchBufferLength)
670 DWORD cchBufferLength)
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 ERROR_NOT_ENOUGH_MEMORY
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
PUNICODE_STRING WINAPI Basep8BitStringToStaticUnicodeString(IN LPCSTR String)
static const WCHAR SymbolicLink[]
_Must_inspect_result_ _Inout_opt_ PUNICODE_STRING VolumeName
_Must_inspect_result_ _Out_ PHANDLE VolumeHandle
#define FILE_SYNCHRONOUS_IO_ALERT
#define OBJ_CASE_INSENSITIVE
BOOL WINAPI FindVolumeMountPointClose(IN HANDLE hFindVolumeMountPoint)
BOOL WINAPI FindNextVolumeMountPointA(IN HANDLE hFindVolumeMountPoint, IN LPSTR lpszVolumeMountPoint, DWORD cchBufferLength)
BOOL WINAPI GetVolumeNameForVolumeMountPointA(IN LPCSTR lpszVolumeMountPoint, IN LPSTR lpszVolumeName, IN DWORD cchBufferLength)
BOOL WINAPI DeleteVolumeMountPointA(IN LPCSTR lpszVolumeMountPoint)
BOOL WINAPI FindNextVolumeMountPointW(IN HANDLE hFindVolumeMountPoint, IN LPWSTR lpszVolumeMountPoint, DWORD cchBufferLength)
BOOL WINAPI SetVolumeMountPointA(IN LPCSTR lpszVolumeMountPoint, IN LPCSTR lpszVolumeName)
BOOL WINAPI SetVolumeMountPointW(IN LPCWSTR lpszVolumeMountPoint, IN LPCWSTR lpszVolumeName)
BOOL WINAPI GetVolumeNameForVolumeMountPointW(IN LPCWSTR VolumeMountPoint, OUT LPWSTR VolumeName, IN DWORD VolumeNameLength)
BOOL BasepGetVolumeNameForVolumeMountPoint(IN LPCWSTR lpszMountPoint, OUT LPWSTR lpszVolumeName, IN DWORD cchBufferLength, OUT LPBOOL IsAMountPoint)
static BOOL GetVolumeNameForRoot(IN LPCWSTR lpszRootPath, OUT LPWSTR lpszVolumeName, IN DWORD cchBufferLength)
BOOL BasepGetVolumeNameFromReparsePoint(IN LPCWSTR lpszMountPoint, OUT LPWSTR lpszVolumeName, IN DWORD cchBufferLength, OUT LPBOOL IsAMountPoint)
HANDLE WINAPI FindFirstVolumeMountPointA(IN LPCSTR lpszRootPathName, IN LPSTR lpszVolumeMountPoint, IN DWORD cchBufferLength)
HANDLE WINAPI FindFirstVolumeMountPointW(IN LPCWSTR lpszRootPathName, IN LPWSTR lpszVolumeMountPoint, IN DWORD cchBufferLength)
BOOL WINAPI DeleteVolumeMountPointW(IN LPCWSTR lpszVolumeMountPoint)
#define FILE_FLAG_OPEN_REPARSE_POINT
#define FILE_FLAG_BACKUP_SEMANTICS
struct _MOUNTDEV_NAME MOUNTDEV_NAME
#define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME
struct _MOUNTMGR_MOUNT_POINT MOUNTMGR_MOUNT_POINT
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
#define IOCTL_MOUNTMGR_QUERY_POINTS
#define MOUNTMGR_DOS_DEVICE_NAME
#define MOUNTMGR_IS_NT_VOLUME_NAME(s)
#define MOUNTMGR_IS_DOS_VOLUME_NAME_WB(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)
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
#define FILE_READ_ATTRIBUTES
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define FSCTL_GET_REPARSE_POINT
DWORD BaseSetLastNTError(IN NTSTATUS Status)
MOUNTMGR_MOUNT_POINT MountPoints[1]
ULONG NumberOfMountPoints
USHORT SymbolicLinkNameLength
ULONG SymbolicLinkNameOffset
struct _REPARSE_DATA_BUFFER::@312::@315 MountPointReparseBuffer
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_OBJECT_NAME_INVALID
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
DWORD WINAPI GetLastError(void)
#define ERROR_PATH_NOT_FOUND
#define ERROR_FILENAME_EXCED_RANGE
#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE
#define IO_REPARSE_TAG_MOUNT_POINT