Hallo,
I have a little problem with TaskScheduler.dll 1.9.4 when it runs on an XP-System (SP3)
I get HighestSupportedVersion = 1.1 from the sytem and work only with the function and property of this version.
I add Task
```
Dim ts As TaskService = New TaskService()
Dim td As TaskDefinition
' ....
ts.RootFolder.RegisterTaskDefinition(taskName, td)
```
It worked good and I found the task-file in the folder "scheduled tasks"
But when I try to get all tasks in a listView, I get always an execption when I read the last task Item data.
```
Dim fc As Integer
fc = ts.RootFolder.Tasks.Count
For i = 0 To fc - 1
t = ts.RootFolder.Tasks(i)
....
next
```
For example: I get fc = 6 as tasks count. I think that is task(0) to task(5) witch I found as scheduled task
With index 0 to 4 all its ok, but when I read task(5), I get an "ArgumerntOutOfRangeException" !??
The exception comes everytime on this command <t = ts.RootFolder.Tasks(i)>
When I add an additional task, I get the task(5) !? (but the same problem then with index 6...)
What can I do the get all scheduled task to my listview?
regards
Clark
Comments: ** Comment from web user: dahall **
I have a little problem with TaskScheduler.dll 1.9.4 when it runs on an XP-System (SP3)
I get HighestSupportedVersion = 1.1 from the sytem and work only with the function and property of this version.
I add Task
```
Dim ts As TaskService = New TaskService()
Dim td As TaskDefinition
' ....
ts.RootFolder.RegisterTaskDefinition(taskName, td)
```
It worked good and I found the task-file in the folder "scheduled tasks"
But when I try to get all tasks in a listView, I get always an execption when I read the last task Item data.
```
Dim fc As Integer
fc = ts.RootFolder.Tasks.Count
For i = 0 To fc - 1
t = ts.RootFolder.Tasks(i)
....
next
```
For example: I get fc = 6 as tasks count. I think that is task(0) to task(5) witch I found as scheduled task
With index 0 to 4 all its ok, but when I read task(5), I get an "ArgumerntOutOfRangeException" !??
The exception comes everytime on this command <t = ts.RootFolder.Tasks(i)>
When I add an additional task, I get the task(5) !? (but the same problem then with index 6...)
What can I do the get all scheduled task to my listview?
regards
Clark
Comments: ** Comment from web user: dahall **
The problem is in the Count property. You can use the following code to avert the problem until I post a fix.
```
For Each t As Task In ts.RootFolder.Tasks
' Your code here
Next
```