2 * Test suite for TaskScheduler interface
4 * Copyright (C) 2008 Google (Roy Shea)
5 * Copyright (C) 2018 Dmitry Timoshkov
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
28 #include "wine/test.h"
30 static ITaskScheduler
*test_task_scheduler
;
32 static const WCHAR does_not_existW
[] = {'\\','\\','d','o','e','s','_','n','o','t','_','e','x','i','s','t',0};
35 HRESULT
taskscheduler_delete(ITaskScheduler
*scheduler
, const WCHAR
*name
)
42 hr
= ITaskScheduler_Delete(scheduler
, name
);
43 if (hr
!= HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION
)) break;
46 /* The task scheduler locked the file to load the task (see
47 * ITaskScheduler_Activate()). It should be done soon.
49 trace("Got a sharing violation deleting %s, retrying...\n", wine_dbgstr_w(name
));
55 static void test_NewWorkItem(void)
59 const WCHAR task_name
[] = {'T', 'e', 's', 't', 'i', 'n', 'g', 0};
62 /* Initialize a GUID that will not be a recognized CLSID or a IID */
63 CoCreateGuid(&GUID_BAD
);
65 /* Create TaskScheduler */
66 hres
= CoCreateInstance(&CLSID_CTaskScheduler
, NULL
, CLSCTX_INPROC_SERVER
,
67 &IID_ITaskScheduler
, (void **) &test_task_scheduler
);
68 ok(hres
== S_OK
, "CTaskScheduler CoCreateInstance failed: %08lx\n", hres
);
71 skip("Failed to create task scheduler. Skipping tests.\n");
75 /* Test basic task creation */
76 hres
= ITaskScheduler_NewWorkItem(test_task_scheduler
, task_name
,
77 &CLSID_CTask
, &IID_ITask
, (IUnknown
**)&task
);
78 ok(hres
== S_OK
, "NewNetworkItem failed: %08lx\n", hres
);
82 /* Task creation attempt using invalid work item class ID */
83 hres
= ITaskScheduler_NewWorkItem(test_task_scheduler
, task_name
,
84 &GUID_BAD
, &IID_ITask
, (IUnknown
**)&task
);
85 ok(hres
== CLASS_E_CLASSNOTAVAILABLE
,
86 "Expected CLASS_E_CLASSNOTAVAILABLE: %08lx\n", hres
);
88 /* Task creation attempt using invalid interface ID */
89 hres
= ITaskScheduler_NewWorkItem(test_task_scheduler
, task_name
,
90 &CLSID_CTask
, &GUID_BAD
, (IUnknown
**)&task
);
91 ok(hres
== E_NOINTERFACE
, "Expected E_NOINTERFACE: %08lx\n", hres
);
93 /* Task creation attempt using invalid work item class and interface ID */
94 hres
= ITaskScheduler_NewWorkItem(test_task_scheduler
, task_name
,
95 &GUID_BAD
, &GUID_BAD
, (IUnknown
**)&task
);
96 ok(hres
== CLASS_E_CLASSNOTAVAILABLE
,
97 "Expected CLASS_E_CLASSNOTAVAILABLE: %08lx\n", hres
);
99 ITaskScheduler_Release(test_task_scheduler
);
103 static void test_Activate(void)
107 const WCHAR not_task_name
[] =
108 {'N', 'o', 'S', 'u', 'c', 'h', 'T', 'a', 's', 'k', 0};
110 /* Create TaskScheduler */
111 hres
= CoCreateInstance(&CLSID_CTaskScheduler
, NULL
, CLSCTX_INPROC_SERVER
,
112 &IID_ITaskScheduler
, (void **) &test_task_scheduler
);
113 ok(hres
== S_OK
, "CTaskScheduler CoCreateInstance failed: %08lx\n", hres
);
116 skip("Failed to create task scheduler. Skipping tests.\n");
120 /* Attempt to activate a nonexistent task */
121 hres
= ITaskScheduler_Activate(test_task_scheduler
, not_task_name
,
122 &IID_ITask
, (IUnknown
**)&task
);
123 ok(hres
== COR_E_FILENOTFOUND
, "Expected COR_E_FILENOTFOUND: %08lx\n", hres
);
125 ITaskScheduler_Release(test_task_scheduler
);
129 static void test_GetTargetComputer(void)
134 /* Create TaskScheduler */
135 hres
= CoCreateInstance(&CLSID_CTaskScheduler
, NULL
, CLSCTX_INPROC_SERVER
,
136 &IID_ITaskScheduler
, (void **) &test_task_scheduler
);
137 ok(hres
== S_OK
, "CTaskScheduler CoCreateInstance failed: %08lx\n", hres
);
140 skip("Failed to create task scheduler.\n");
146 /* This crashes on w2k */
147 hres
= ITaskScheduler_GetTargetComputer(test_task_scheduler
, NULL
);
148 ok(hres
== E_INVALIDARG
, "got 0x%lx (expected E_INVALIDARG)\n", hres
);
151 hres
= ITaskScheduler_GetTargetComputer(test_task_scheduler
, &oldname
);
152 ok((hres
== S_OK
) && oldname
&& oldname
[0] == '\\' && oldname
[1] == '\\' && oldname
[2],
153 "got 0x%lx and %s (expected S_OK and an unc name)\n", hres
, wine_dbgstr_w(oldname
));
155 CoTaskMemFree(oldname
);
157 ITaskScheduler_Release(test_task_scheduler
);
161 static void test_SetTargetComputer(void)
163 WCHAR buffer
[MAX_COMPUTERNAME_LENGTH
+ 3]; /* extra space for two '\' and a zero */
164 DWORD len
= MAX_COMPUTERNAME_LENGTH
+ 1; /* extra space for a zero */
165 WCHAR
*oldname
= NULL
;
172 if (!GetComputerNameW(buffer
+ 2, &len
))
175 /* Create TaskScheduler */
176 hres
= CoCreateInstance(&CLSID_CTaskScheduler
, NULL
, CLSCTX_INPROC_SERVER
,
177 &IID_ITaskScheduler
, (void **) &test_task_scheduler
);
178 ok(hres
== S_OK
, "CTaskScheduler CoCreateInstance failed: %08lx\n", hres
);
181 skip("Failed to create task scheduler. Skipping tests.\n");
185 hres
= ITaskScheduler_GetTargetComputer(test_task_scheduler
, &oldname
);
186 ok(hres
== S_OK
, "got 0x%lx and %s (expected S_OK)\n", hres
, wine_dbgstr_w(oldname
));
188 /* NULL is an alias for the local computer */
189 hres
= ITaskScheduler_SetTargetComputer(test_task_scheduler
, NULL
);
190 ok(hres
== S_OK
, "got 0x%lx (expected S_OK)\n", hres
);
191 hres
= ITaskScheduler_GetTargetComputer(test_task_scheduler
, &name
);
192 ok((hres
== S_OK
&& !lstrcmpiW(name
, buffer
)),
193 "got 0x%lx with %s (expected S_OK and %s)\n",
194 hres
, wine_dbgstr_w(name
), wine_dbgstr_w(buffer
));
197 /* The name must be valid */
198 hres
= ITaskScheduler_SetTargetComputer(test_task_scheduler
, does_not_existW
);
199 ok(hres
== HRESULT_FROM_WIN32(ERROR_BAD_NETPATH
), "got 0x%lx (expected 0x80070035)\n", hres
);
200 /* the name of the target computer is unchanged */
201 hres
= ITaskScheduler_GetTargetComputer(test_task_scheduler
, &name
);
202 ok((hres
== S_OK
&& !lstrcmpiW(name
, buffer
)),
203 "got 0x%lx with %s (expected S_OK and %s)\n",
204 hres
, wine_dbgstr_w(name
), wine_dbgstr_w(buffer
));
207 /* the two backslashes are optional */
208 hres
= ITaskScheduler_SetTargetComputer(test_task_scheduler
, oldname
+ 2);
209 if (hres
== E_ACCESSDENIED
)
211 skip("SetTargetComputer failed with E_ACCESSDENIED (needs admin rights)\n");
214 ok(hres
== S_OK
, "got 0x%lx (expected S_OK)\n", hres
);
216 /* the case is ignored */
218 hres
= ITaskScheduler_SetTargetComputer(test_task_scheduler
, buffer
);
219 ok(hres
== S_OK
, "got 0x%lx (expected S_OK)\n", hres
);
221 hres
= ITaskScheduler_SetTargetComputer(test_task_scheduler
, buffer
);
222 ok(hres
== S_OK
, "got 0x%lx (expected S_OK)\n", hres
);
225 hres
= ITaskScheduler_SetTargetComputer(test_task_scheduler
, oldname
);
226 ok(hres
== S_OK
, "got 0x%lx (expected S_OK)\n", hres
);
229 CoTaskMemFree(oldname
);
230 ITaskScheduler_Release(test_task_scheduler
);
234 static void test_Enum(void)
236 static const WCHAR Task1
[] = { 'w','i','n','e','t','a','s','k','1',0 };
237 ITaskScheduler
*scheduler
;
239 IEnumWorkItems
*tasks
;
244 hr
= CoCreateInstance(&CLSID_CTaskScheduler
, NULL
, CLSCTX_INPROC_SERVER
,
245 &IID_ITaskScheduler
, (void **)&scheduler
);
246 ok(hr
== S_OK
, "got %#lx\n", hr
);
248 /* cleanup after previous runs */
249 taskscheduler_delete(scheduler
, Task1
);
251 hr
= ITaskScheduler_NewWorkItem(scheduler
, Task1
, &CLSID_CTask
, &IID_ITask
, (IUnknown
**)&task
);
252 ok(hr
== S_OK
, "got %#lx\n", hr
);
253 hr
= ITaskScheduler_AddWorkItem(scheduler
, Task1
, (IScheduledWorkItem
*)task
);
254 ok(hr
== S_OK
, "got %#lx\n", hr
);
258 hr
= ITaskScheduler_Enum(scheduler
, NULL
);
259 ok(hr
== E_INVALIDARG
, "got %#lx\n", hr
);
261 hr
= ITaskScheduler_Enum(scheduler
, &tasks
);
262 ok(hr
== S_OK
, "got %#lx\n", hr
);
264 names
= (void *)0xdeadbeef;
265 fetched
= 0xdeadbeef;
266 hr
= IEnumWorkItems_Next(tasks
, 0, &names
, &fetched
);
267 ok(hr
== E_INVALIDARG
, "got %#lx\n", hr
);
268 ok(names
== (void *)0xdeadbeef, "got %p\n", names
);
269 ok(fetched
== 0xdeadbeef, "got %#lx\n", fetched
);
271 hr
= IEnumWorkItems_Next(tasks
, 1, NULL
, NULL
);
272 ok(hr
== E_INVALIDARG
, "got %#lx\n", hr
);
275 hr
= IEnumWorkItems_Next(tasks
, 1, &names
, NULL
);
276 ok(hr
== S_OK
, "got %#lx\n", hr
);
277 ok(names
!= NULL
, "got NULL\n");
278 ok(names
[0] != NULL
, "got NULL\n");
279 CoTaskMemFree(names
[0]);
280 CoTaskMemFree(names
);
282 names
= (void *)0xdeadbeef;
283 hr
= IEnumWorkItems_Next(tasks
, 2, &names
, NULL
);
284 ok(hr
== E_INVALIDARG
, "got %#lx\n", hr
);
285 ok(names
== (void *)0xdeadbeef, "got %p\n", names
);
287 hr
= IEnumWorkItems_Reset(tasks
);
288 ok(hr
== S_OK
, "got %#lx\n", hr
);
291 fetched
= 0xdeadbeef;
292 hr
= IEnumWorkItems_Next(tasks
, 1, &names
, &fetched
);
293 ok(hr
== S_OK
, "got %#lx\n", hr
);
294 ok(names
!= NULL
, "got NULL\n");
295 ok(names
[0] != NULL
, "got NULL\n");
296 ok(fetched
== 1, "got %lu\n", fetched
);
297 CoTaskMemFree(names
[0]);
298 CoTaskMemFree(names
);
300 while (IEnumWorkItems_Skip(tasks
, 1) == S_OK
)
303 hr
= IEnumWorkItems_Skip(tasks
, 1);
304 ok(hr
== S_FALSE
, "got %#lx\n", hr
);
306 names
= (void *)0xdeadbeef;
307 fetched
= 0xdeadbeef;
308 hr
= IEnumWorkItems_Next(tasks
, 1, &names
, &fetched
);
309 ok(hr
== S_FALSE
, "got %#lx\n", hr
);
310 ok(names
== NULL
, "got %p\n", names
);
311 ok(fetched
== 0, "got %lu\n", fetched
);
313 IEnumWorkItems_Release(tasks
);
315 hr
= taskscheduler_delete(scheduler
, Task1
);
316 ok(hr
== S_OK
, "got %#lx\n", hr
);
318 ITaskScheduler_Release(scheduler
);
321 static BOOL
file_exists(const WCHAR
*name
)
323 return GetFileAttributesW(name
) != INVALID_FILE_ATTRIBUTES
;
326 static void test_save_task_curfile(ITask
*task
)
332 hr
= ITask_QueryInterface(task
, &IID_IPersistFile
, (void **)&pfile
);
333 ok(hr
== S_OK
, "QueryInterface error %#lx\n", hr
);
336 hr
= IPersistFile_GetCurFile(pfile
, &curfile
);
337 ok(hr
== S_OK
, "GetCurFile error %#lx\n", hr
);
338 ok(curfile
&& curfile
[0], "curfile should not be NULL\n");
340 ok(file_exists(curfile
), "curfile should exist\n");
342 hr
= IPersistFile_Save(pfile
, curfile
, FALSE
);
343 ok(hr
== HRESULT_FROM_WIN32(ERROR_FILE_EXISTS
), "wrong error %#lx\n", hr
);
345 hr
= IPersistFile_Save(pfile
, curfile
, TRUE
);
346 ok(hr
== HRESULT_FROM_WIN32(ERROR_FILE_EXISTS
), "wrong error %#lx\n", hr
);
348 hr
= IPersistFile_Save(pfile
, NULL
, FALSE
);
349 ok(hr
== S_OK
, "Save error %#lx\n", hr
);
351 hr
= IPersistFile_Save(pfile
, NULL
, TRUE
);
352 ok(hr
== S_OK
, "Save error %#lx\n", hr
);
353 CoTaskMemFree(curfile
);
356 hr
= IPersistFile_GetCurFile(pfile
, &curfile
);
357 ok(hr
== S_OK
, "GetCurFile error %#lx\n", hr
);
358 ok(curfile
&& curfile
[0] , "curfile should not be NULL\n");
359 CoTaskMemFree(curfile
);
361 IPersistFile_Release(pfile
);
364 static WCHAR
*get_task_curfile(ITask
*task
, BOOL should_exist
, BOOL is_dirty
, int line
)
371 hr
= ITask_QueryInterface(task
, &IID_IPersistFile
, (void **)&pfile
);
372 ok_(__FILE__
, line
)(hr
== S_OK
, "QueryInterface error %#lx\n", hr
);
374 hr
= IPersistFile_IsDirty(pfile
);
375 ok_(__FILE__
, line
)(hr
== is_dirty
? S_OK
: S_FALSE
, "got %#lx\n", hr
);
378 hr
= IPersistFile_GetCurFile(pfile
, &curfile
);
379 ok_(__FILE__
, line
)(hr
== S_OK
, "GetCurFile error %#lx\n", hr
);
380 ok_(__FILE__
, line
)(curfile
&& curfile
[0] , "curfile should not be NULL\n");
382 hr
= IPersistFile_Load(pfile
, curfile
, STGM_READ
);
384 ok_(__FILE__
, line
)(hr
== S_OK
, "Load error %#lx\n", hr
);
386 ok_(__FILE__
, line
)(hr
== HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND
), "wrong error %#lx\n", hr
);
388 if (0) /* crashes under Windows */
389 hr
= IPersistFile_GetClassID(pfile
, NULL
);
391 hr
= IPersistFile_GetClassID(pfile
, &clsid
);
392 ok_(__FILE__
, line
)(hr
== S_OK
, "GetClassID error %#lx\n", hr
);
393 ok_(__FILE__
, line
)(IsEqualCLSID(&clsid
, &CLSID_CTask
), "got %s\n", wine_dbgstr_guid(&clsid
));
395 IPersistFile_Release(pfile
);
400 static void test_task_storage(void)
402 static const WCHAR Task1
[] = { 'w','i','n','e','t','a','s','k','1',0 };
403 static const WCHAR Task2
[] = { 'w','i','n','e','t','a','s','k','2',0 };
404 static const WCHAR Task3
[] = { 'w','i','n','e','t','a','s','k','3',0 };
405 static const WCHAR Task1_ext
[] = { 'w','i','n','e','t','a','s','k','.','e','x','t',0 };
406 static const WCHAR Task1_job
[] = { '\\','T','a','s','k','s','\\','w','i','n','e','t','a','s','k','1','.','j','o','b',0 };
407 static const WCHAR Task2_job
[] = { '\\','T','a','s','k','s','\\','w','i','n','e','t','a','s','k','2','.','j','o','b',0 };
408 static const WCHAR Task3_job
[] = { '\\','T','a','s','k','s','\\','w','i','n','e','t','a','s','k','3','.','j','o','b',0 };
409 WCHAR task1_full_name
[MAX_PATH
], task2_full_name
[MAX_PATH
], task3_full_name
[MAX_PATH
];
411 ITaskScheduler
*scheduler
;
413 WCHAR
*curfile
, *curfile2
;
415 GetWindowsDirectoryW(task1_full_name
, MAX_PATH
);
416 lstrcatW(task1_full_name
, Task1_job
);
417 GetWindowsDirectoryW(task2_full_name
, MAX_PATH
);
418 lstrcatW(task2_full_name
, Task2_job
);
419 GetWindowsDirectoryW(task3_full_name
, MAX_PATH
);
420 lstrcatW(task3_full_name
, Task3_job
);
422 /* cleanup after previous runs */
423 DeleteFileW(task1_full_name
);
424 DeleteFileW(task2_full_name
);
425 DeleteFileW(task3_full_name
);
427 hr
= CoCreateInstance(&CLSID_CTaskScheduler
, NULL
, CLSCTX_INPROC_SERVER
, &IID_ITaskScheduler
, (void **)&scheduler
);
430 win_skip("CoCreateInstance(CLSID_CTaskScheduler) error %#lx\n", hr
);
434 hr
= ITaskScheduler_Delete(scheduler
, Task1_ext
);
435 ok(hr
== E_INVALIDARG
, "wrong error %#lx\n", hr
);
437 hr
= ITaskScheduler_Delete(scheduler
, Task1
);
438 ok(hr
== HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND
), "wrong error %#lx\n", hr
);
440 hr
= ITaskScheduler_NewWorkItem(scheduler
, Task1_ext
, &CLSID_CTask
, &IID_ITask
, (IUnknown
**)&task
);
441 ok(hr
== E_INVALIDARG
, "wrong error %#lx\n", hr
);
443 hr
= ITaskScheduler_NewWorkItem(scheduler
, Task1
, &CLSID_CTask
, &IID_ITask
, (IUnknown
**)&task
);
444 ok(hr
== S_OK
, "NewWorkItem error %#lx\n", hr
);
446 curfile
= get_task_curfile(task
, FALSE
, FALSE
, __LINE__
);
447 ok(!file_exists(curfile
), "curfile should not exist\n");
448 ok(!lstrcmpW(curfile
, task1_full_name
), "name is wrong %s\n", wine_dbgstr_w(curfile
));
450 hr
= ITask_SetComment(task
, Task1
);
451 ok(hr
== S_OK
, "got %#lx\n", hr
);
453 curfile2
= get_task_curfile(task
, FALSE
, TRUE
, __LINE__
);
454 ok(!file_exists(curfile2
), "curfile should not exist\n");
455 ok(!lstrcmpW(curfile2
, task1_full_name
), "name is wrong %s\n", wine_dbgstr_w(curfile2
));
456 CoTaskMemFree(curfile2
);
458 hr
= ITaskScheduler_NewWorkItem(scheduler
, Task1
, &CLSID_CTask
, &IID_ITask
, (IUnknown
**)&task2
);
459 ok(hr
== S_OK
, "NewWorkItem error %#lx\n", hr
);
460 ok(task2
!= task
, "tasks should not be equal\n");
462 curfile2
= get_task_curfile(task2
, FALSE
, FALSE
, __LINE__
);
463 ok(!file_exists(curfile2
), "curfile2 should not exist\n");
464 ok(!lstrcmpW(curfile2
, task1_full_name
), "name is wrong %s\n", wine_dbgstr_w(curfile2
));
466 CoTaskMemFree(curfile
);
467 CoTaskMemFree(curfile2
);
468 ITask_Release(task2
);
470 task2
= (ITask
*)0xdeadbeef;
471 hr
= ITaskScheduler_Activate(scheduler
, Task1
, &IID_ITask
, (IUnknown
**)&task2
);
472 ok(hr
== HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND
), "wrong error %#lx\n", hr
);
473 ok(task2
== (ITask
*)0xdeadbeef, "task should not be set to NULL\n");
475 hr
= ITaskScheduler_AddWorkItem(scheduler
, Task2
, (IScheduledWorkItem
*)task
);
476 ok(hr
== S_OK
, "AddWorkItem error %#lx\n", hr
);
477 curfile
= get_task_curfile(task
, TRUE
, FALSE
, __LINE__
);
478 ok(file_exists(curfile
), "curfile should exist\n");
479 ok(!lstrcmpW(curfile
, task2_full_name
), "name is wrong %s\n", wine_dbgstr_w(curfile
));
480 CoTaskMemFree(curfile
);
482 hr
= ITaskScheduler_AddWorkItem(scheduler
, Task3
, (IScheduledWorkItem
*)task
);
483 ok(hr
== S_OK
, "AddWorkItem error %#lx\n", hr
);
484 curfile
= get_task_curfile(task
, TRUE
, FALSE
, __LINE__
);
485 ok(file_exists(curfile
), "curfile should exist\n");
486 ok(!lstrcmpW(curfile
, task3_full_name
), "name is wrong %s\n", wine_dbgstr_w(curfile
));
487 CoTaskMemFree(curfile
);
489 hr
= ITaskScheduler_AddWorkItem(scheduler
, Task1
, (IScheduledWorkItem
*)task
);
490 ok(hr
== S_OK
, "AddWorkItem error %#lx\n", hr
);
491 curfile
= get_task_curfile(task
, TRUE
, FALSE
, __LINE__
);
492 ok(file_exists(curfile
), "curfile should exist\n");
493 ok(!lstrcmpW(curfile
, task1_full_name
), "name is wrong %s\n", wine_dbgstr_w(curfile
));
494 CoTaskMemFree(curfile
);
496 hr
= ITaskScheduler_AddWorkItem(scheduler
, Task1
, (IScheduledWorkItem
*)task
);
497 ok(hr
== HRESULT_FROM_WIN32(ERROR_FILE_EXISTS
), "wrong error %#lx\n", hr
);
499 curfile
= get_task_curfile(task
, TRUE
, FALSE
, __LINE__
);
500 ok(file_exists(curfile
), "curfile should exist\n");
502 CoTaskMemFree(curfile
);
506 hr
= ITaskScheduler_Activate(scheduler
, Task1
, &IID_ITask
, (IUnknown
**)&task
);
507 ok(hr
== S_OK
, "Activate error %#lx\n", hr
);
508 ok(task
!= NULL
, "task should not be set to NULL\n");
510 curfile
= get_task_curfile(task
, TRUE
, FALSE
, __LINE__
);
511 ok(file_exists(curfile
), "curfile2 should exist\n");
512 ok(!lstrcmpW(curfile
, task1_full_name
), "name is wrong %s\n", wine_dbgstr_w(curfile
));
514 CoTaskMemFree(curfile
);
516 test_save_task_curfile(task
);
518 hr
= taskscheduler_delete(scheduler
, Task1
);
519 ok(hr
== S_OK
, "got %#lx\n", hr
);
520 hr
= taskscheduler_delete(scheduler
, Task2
);
521 ok(hr
== S_OK
, "got %#lx\n", hr
);
522 hr
= taskscheduler_delete(scheduler
, Task3
);
523 ok(hr
== S_OK
, "got %#lx\n", hr
);
526 ITaskScheduler_Release(scheduler
);
529 START_TEST(task_scheduler
)
536 test_GetTargetComputer();
537 test_SetTargetComputer();