我有以下用 QTP 编写的代码
Set oNetwork = DotNetFactory( "Microsoft.VisualBasic.Devices.Network" ,"Microsoft.VisualBasic")
bFlag=oNetwork.ping(strWebSiteName)
If bFlag Then
MsgBox( "Website is avilable" )
Else
MsgBox( "Website not avilable" )
End If
Set oNetwork=nothing
但是当我执行此代码时,我收到以下错误
Cannot load Assembly Microsoft.VisualBasic.Devices
Line (27): "Set oNetwork = DotNetFactory( "Microsoft.VisualBasic.Devices.Network" ,"Microsoft.VisualBasic.Devices")"
谁能告诉我,出了什么问题?
.NET Framework 4 已安装在我的系统中。