M
Mark Hollander
Hi,
I am using the WMI management object to obtain values about the network
cards installed on the system.
The MSDN tells me the following
class Win32_NetworkAdapterConfiguration : CIM_Setting
{
...
datetime DHCPLeaseExpires;
datetime DHCPLeaseObtained;
...
};
When I use the following code
Dim dExpires as DateTime
dExpires = CType(wmi.Item("DHCPLeaseExpires"), DateTime)
I Get the following exception
System.InvalidCastException: Cast from string
"20041109122048.000000+120" to type 'Date' is not valid.
at Microsoft.VisualBasic.CompilerServices.DateType.FromString(String
Value, CultureInfo culture)
at Microsoft.VisualBasic.CompilerServices.DateType.FromString(String
Value)
at Microsoft.VisualBasic.CompilerServices.DateType.FromObject(Object
Value)
at Assimilator.SDK.clsNICProperties.PopulateNetworkAdapterArray() in
V:\VBNET\Assimilator Ver 4.2\Assimilator.SDK\clsNICProperties.vb:line
212
How do I fix ?????
Thank You
Mark Hollander
I am using the WMI management object to obtain values about the network
cards installed on the system.
The MSDN tells me the following
class Win32_NetworkAdapterConfiguration : CIM_Setting
{
...
datetime DHCPLeaseExpires;
datetime DHCPLeaseObtained;
...
};
When I use the following code
Dim dExpires as DateTime
dExpires = CType(wmi.Item("DHCPLeaseExpires"), DateTime)
I Get the following exception
System.InvalidCastException: Cast from string
"20041109122048.000000+120" to type 'Date' is not valid.
at Microsoft.VisualBasic.CompilerServices.DateType.FromString(String
Value, CultureInfo culture)
at Microsoft.VisualBasic.CompilerServices.DateType.FromString(String
Value)
at Microsoft.VisualBasic.CompilerServices.DateType.FromObject(Object
Value)
at Assimilator.SDK.clsNICProperties.PopulateNetworkAdapterArray() in
V:\VBNET\Assimilator Ver 4.2\Assimilator.SDK\clsNICProperties.vb:line
212
How do I fix ?????
Thank You
Mark Hollander