WMI 80211 NDis Help

Joined
Dec 23, 2005
Messages
1
Reaction score
0
Hello,

I am trying to return the amount of packets my wireless NIC has transmitted using VB6 and WMI. Here is my effort:

Code:
   Set WMIClass = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\wmi")
   Set WMIObj = WMIClass.ExecQuery("SELECT * FROM MSNdis_80211_Statistics WHERE Active=True")
   '
   On Error GoTo bail
   For Each tmp In WMIObj
   frmMain.MSFlexGrid1.TextMatrix(7, 1) = tmp.TransmittedFragmentCount
   Exit Sub
   Next
   '
   bail:
   frmMain.MSFlexGrid1.TextMatrix(7, 1) = "error"

The result is that the For Each line will trigger an Automation Error without the bail GoTo clause. Any help?

thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top