27{
31
32 VFDTRACE(VFDINFO, (
"[VFD] VfdSetLink - IN\n"));
33
34
35
36 if (DriveLetter >= 'a' && DriveLetter <= 'z') {
37 DriveLetter -= ('a' - 'A');
38 }
39
40
41
42 if (DriveLetter != 0 &&
43 (DriveLetter < 'A' || DriveLetter > 'Z')) {
45 }
46
47 if (DeviceExtension->DriveLetter &&
48 DeviceExtension->DriveLetter != DriveLetter) {
49
50
51
52#ifndef __REACTOS__
54#else
56#endif
57
59 L"\\??\\%wc:", DeviceExtension->DriveLetter);
60
62
64
67 ("[VFD] Link %ws deleted\n", name_buf));
68
69 DeviceExtension->DriveLetter = 0;
70 }
72
73
75 ("[VFD] Link %ws not found\n", name_buf));
76
77 DeviceExtension->DriveLetter = 0;
79 }
80 else {
82 ("[VFD] IoDeleteSymbolicLink %ws - %s\n",
83 name_buf, GetStatusName(
status)));
84 }
85 }
86
88
89
90
91
92#ifndef __REACTOS__
94
97 L"\\??\\Global\\%wc:" :
L"\\??\\%wc:",
98 DriveLetter);
99#else
101
104 L"\\??\\Global\\%wc:" :
L"\\??\\%wc:",
105 DriveLetter);
106#endif
107
109
111 &unicode_name, &(DeviceExtension->DeviceName));
112
114 VFDTRACE(VFDINFO, (
"[VFD] Link %ws created\n", name_buf));
115
116 DeviceExtension->DriveLetter = DriveLetter;
117 }
118 else {
120 ("[VFD] IoCreateSymbolicLink %ws - %s\n",
121 name_buf, GetStatusName(
status)));
122 }
123 }
124
126 (
"[VFD] VfdSetLink - %s\n", GetStatusName(
status)));
127
129}
#define NT_SUCCESS(StatCode)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI IoCreateSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
NTSTATUS NTAPI IoDeleteSymbolicLink(IN PUNICODE_STRING SymbolicLinkName)
#define STATUS_INVALID_PARAMETER
#define STATUS_OBJECT_NAME_NOT_FOUND