79{
81 static const WCHAR cmdexeW[] =
L"\\cmd.exe";
84 IWshExec *shexec;
85 IWshShell3 *sh3;
87 IWshCollection *coll;
90 IFolderCollection *folders;
91 IWshShortcut *shcut;
94 TYPEATTR *tattr;
102
106
107 hr = IDispatch_QueryInterface(disp, &IID_IWshShell3, (
void**)&
shell);
110
111 hr = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (
void**)&dispex);
113 IDispatch_Release(disp);
114
115 hr = IUnknown_QueryInterface(
shell, &IID_IWshShell3, (
void**)&sh3);
117
120
121 hr = IWshShell3_QueryInterface(sh3, &IID_IWshShell, (
void**)&unk);
123 IUnknown_Release(unk);
124
125 hr = IWshShell3_QueryInterface(sh3, &IID_IWshShell2, (
void**)&unk);
127 IUnknown_Release(unk);
128
129 hr = IWshShell3_get_SpecialFolders(sh3, &coll);
132
133 hr = IWshCollection_QueryInterface(coll, &IID_IFolderCollection, (
void**)&folders);
135
136 hr = IWshCollection_QueryInterface(coll, &
IID_IDispatch, (
void**)&disp);
138
139 hr = IDispatch_GetTypeInfo(disp, 0, 0, &ti);
141
142 hr = ITypeInfo_GetTypeAttr(ti, &tattr);
144 ok(
IsEqualIID(&tattr->guid, &IID_IWshCollection),
"got wrong type guid\n");
145 ITypeInfo_ReleaseTypeAttr(ti, tattr);
146
147
152 dp.rgdispidNamedArgs =
NULL;
153 dp.cArgs = 1;
154 dp.cNamedArgs = 0;
157
158
160 hr = IWshCollection_Item(coll, &
arg, &
res);
166
167
169 hr = IWshShell3_CreateShortcut(sh3,
str, &shortcut);
172 hr = IDispatch_QueryInterface(shortcut, &IID_IWshShortcut, (
void**)&shcut);
175
176 hr = IWshShortcut_get_Arguments(shcut,
NULL);
178
179 hr = IWshShortcut_get_IconLocation(shcut,
NULL);
181
182 IWshShortcut_Release(shcut);
183 IDispatch_Release(shortcut);
184
185
186 hr = IWshShell3_ExpandEnvironmentStrings(sh3,
NULL,
NULL);
188
190 hr = IWshShell3_ExpandEnvironmentStrings(sh3,
str,
NULL);
193
196 hr = IWshShell3_get_Environment(sh3, &
arg, &
env);
199
203
209
210
214
222
223
231
232 IWshEnvironment_Release(
env);
233
238
242
247
252
260
265
272
275
282
289
294
295
301
306
313
317
318
319 if (0)
320 hr = IWshShell3_get_CurrentDirectory(sh3,
NULL);
321
323 hr = IWshShell3_get_CurrentDirectory(sh3, &
str);
325 ok(
str &&
str[0] != 0,
"got empty string\n");
328
329 hr = IWshShell3_put_CurrentDirectory(sh3,
NULL);
332
334 hr = IWshShell3_put_CurrentDirectory(sh3,
str);
337
339 hr = IWshShell3_put_CurrentDirectory(sh3,
str);
342
343
346
347 hr = IWshShell3_Exec(sh3,
NULL, &shexec);
349
351 hr = IWshShell3_Exec(sh3,
str, &shexec);
354
356 hr = IWshShell3_Exec(sh3,
str, &shexec);
359
361 hr = IWshShell3_Exec(sh3,
str, &shexec);
364
365 IWshCollection_Release(coll);
366 IDispatch_Release(disp);
367 IWshShell3_Release(sh3);
368 IUnknown_Release(
shell);
369}
void shell(int argc, const char *argv[])
static LPCWSTR LPCWSTR LPCWSTR env
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
GLenum GLuint GLenum GLsizei const GLchar * buf
static const WCHAR emptyW[]
static const WCHAR path2[]
struct stdole::DISPPARAMS DISPPARAMS
struct stdole::EXCEPINFO EXCEPINFO
#define DISPATCH_PROPERTYGET
#define IsEqualIID(riid1, riid2)
#define INVALID_FILE_ATTRIBUTES
#define DISP_E_MEMBERNOTFOUND
#define DISP_E_TYPEMISMATCH
#define test_provideclassinfo(a, b)