Go to the source code of this file.
◆ cmdUse()
Definition at line 104 of file cmdUse.c.
107{
109
111 {
115 else
117
118 return 0;
119 }
121 {
123 {
125 return 1;
126 }
127
131 else
133
134 return 0;
135 }
136
139 {
141 }
142 else
143 {
144 if ((
argv[2][0] !=
'*' &&
argv[2][1] != 0) &&
146 {
148 return 1;
149 }
150 }
151
153 {
155 }
156
158 {
160 {
162 return 1;
163 }
164
168
170 }
171 else
172 {
177
180 {
182 return 1;
183 }
184
185 if (
argv[3][0] !=
L'\\' ||
argv[3][1] !=
L'\\')
186 {
188 return 1;
189 }
190
192 {
196 {
198 if (Cpy)
199 {
203
204 if (
wcsstr(Cpy,
L"/PERSISTENT:") == Cpy)
205 {
207 if (
Len == 14 && Arg[0] ==
'N' && Arg[1] ==
'O')
208 {
210 }
211 else if (
Len == 15 && Arg[0] ==
'Y' && Arg[1] ==
'E' && Arg[2] ==
'S')
212 {
214 }
215 else
216 {
219 return 1;
220 }
221 }
223 }
224 }
225
226 }
227
232
238
240 }
241}
static VOID PrintErrorMessage(DWORD dwError)
VOID PrintMessageStringV(DWORD dwMessage,...)
BOOL Delete(LPCTSTR ServiceName)
static DWORD EnumerateConnections(LPCWSTR Local)
static VOID PrintError(DWORD Status)
static BOOL ValidateDeviceName(PWSTR DevName)
#define HeapFree(x, y, z)
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
#define CONNECT_UPDATE_PROFILE
#define RESOURCETYPE_DISK
#define CONNECT_LOCALDRIVE
#define WNetUseConnection
#define WNetCancelConnection2
◆ EnumerateConnections()
Definition at line 14 of file cmdUse.c.
15{
22
24
27 {
28 return 1;
29 }
30
32 if (!lpRes)
33 {
35 return 1;
36 }
37
38 do
39 {
40 dSize = 0x1000;
41 dCount = -1;
42
46 {
47 lpCur = lpRes;
48 for (; dCount; dCount--)
49 {
51 {
53 }
54
55 lpCur++;
56 }
57 }
59
62
63 return 0;
64}
void ConPrintf(FILE *fp, LPCWSTR psz,...)
#define RESOURCE_CONNECTED
#define WN_NO_MORE_ENTRIES
DWORD WINAPI WNetCloseEnum(HANDLE hEnum)
Referenced by cmdUse().
◆ PrintError()
Definition at line 68 of file cmdUse.c.
69{
70 WCHAR szStatusBuffer[16];
72
75
77 {
80 }
81}
HLOCAL NTAPI LocalFree(HLOCAL hMem)
#define FORMAT_MESSAGE_IGNORE_INSERTS
#define FORMAT_MESSAGE_FROM_SYSTEM
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Referenced by cmdUse().
◆ ValidateDeviceName()
static BOOL ValidateDeviceName |
( |
PWSTR |
DevName | ) |
|
|
static |
Definition at line 85 of file cmdUse.c.
86{
88
91 {
93 }
94
95 if (!
iswalpha(DevName[0]) || DevName[1] !=
L':')
96 {
98 }
99
101}
Referenced by cmdUse().