Go to the source code of this file.
◆ cmdUse()
Definition at line 94 of file cmdUse.c.
97{
99
101 {
105 else
107
108 return 0;
109 }
111 {
113 {
115 return 1;
116 }
117
121 else
123
124 return 0;
125 }
126
129 {
131 }
132 else
133 {
134 if ((
argv[2][0] !=
'*' &&
argv[2][1] != 0) &&
136 {
138 return 1;
139 }
140 }
141
143 {
145 }
146
148 {
150 {
152 return 1;
153 }
154
158
160 }
161 else
162 {
168
171 {
173 return 1;
174 }
175
176 if (
argv[3][0] !=
L'\\' ||
argv[3][1] !=
L'\\')
177 {
179 return 1;
180 }
181
183 {
187 {
189 if (Cpy)
190 {
194
195 if (
wcsstr(Cpy,
L"/PERSISTENT:") == Cpy)
196 {
198 if (
Len == 14 && Arg[0] ==
'N' && Arg[1] ==
'O')
199 {
201 }
202 else if (
Len == 15 && Arg[0] ==
'Y' && Arg[1] ==
'E' && Arg[2] ==
'S')
203 {
205 }
206 else
207 {
210 return 1;
211 }
212 }
214 }
215 }
216
217 }
218
224
230
232 }
233}
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)
_ACRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP wchar_t *__cdecl wcsstr(const wchar_t *, const wchar_t *)
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
_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
79 {
82 }
83}
HLOCAL NTAPI LocalFree(HLOCAL hMem)
#define LANG_USER_DEFAULT
#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 87 of file cmdUse.c.
88{
89
90 return (DevName[0] &&
iswalpha(DevName[0]) && DevName[1] ==
L':' && !DevName[2]);
91}
Referenced by cmdUse().