Florian Eder others.meder@gmail.com writes:
+static WCHAR *get_absolute_path(const WCHAR *path) +{
- DWORD size;
- WCHAR *absolute_path;
- /* allocate absolute path + potential backslash + null WCHAR */
- size = GetFullPathNameW(path, 0, NULL, NULL) + 2;
- if (!wcsnicmp(path, L"\\?\", 4))
- {
/* already prefixed with \\?\ */
absolute_path = calloc(size, sizeof(WCHAR));
GetFullPathNameW(path, size, absolute_path, NULL);
PathCchAddBackslashEx(absolute_path, size, NULL, NULL);
- }
- else
- {
/* not prefixed with \\?\, we must add it in front of the path */
absolute_path = calloc(size + 4, sizeof(WCHAR));
wcscpy(absolute_path, L"\\\\?\\");
GetFullPathNameW(path, size, &(absolute_path[4]), NULL);
PathCchAddBackslashEx(absolute_path, size + 4, NULL, NULL);
- }
Why do you want to add \?\ to all paths?