G
Guest
I have the following code that works fine on my Development Computer but not
on my other computer. Both Computers are running Windows XP Pro and both
have .netFramework 1.1 installed. The last line of code on my other computer
gives me an error "Item set to Null", probably because the
QueryCollection.Count is returning a null value.
Dim drives() As String
Dim query As ManagementObjectSearcher = New _
ManagementObjectSearcher("SELECT * From Win32_LogicalDisk ")
Dim queryCollection As ManagementObjectCollection = query.Get()
ReDim drives(queryCollection.Count - 1) 'I get the error on this line
Any idea what could be causing this?
on my other computer. Both Computers are running Windows XP Pro and both
have .netFramework 1.1 installed. The last line of code on my other computer
gives me an error "Item set to Null", probably because the
QueryCollection.Count is returning a null value.
Dim drives() As String
Dim query As ManagementObjectSearcher = New _
ManagementObjectSearcher("SELECT * From Win32_LogicalDisk ")
Dim queryCollection As ManagementObjectCollection = query.Get()
ReDim drives(queryCollection.Count - 1) 'I get the error on this line
Any idea what could be causing this?