ManagementClass on Win98 = Exception?

  • Thread starter Thread starter Magnus Persson
  • Start date Start date
M

Magnus Persson

Why does the below line cause an exception on Win98?

ManagementClass mc = new
ManagementClass("Win32_NetworkAdapterConfiguration");

I have tried this on a couple of machines in our network. Always works on
the Win2k/WinXP machines and always causes exceptions on the Win98 machines.

Why?

/Magnus
 
Hello Magnus,

Thanks for your post. The reason is that Win32_NetworkAdapterConfiguration
class is not suppored on Windows 98. Please refer to the "Requirements"
section of MSDN documentation on Win32_NetworkAdapterConfiguration class:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/
win32_networkadapterconfiguration.asp

On Windows 98, please take a look at IP Helper APIs and check if you can
achieve the same goal with them (say, GetAdaptersInfo):

GetAdaptersInfo
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp
/getadaptersinfo.asp

IP Helper
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp
/ip_helper_start_page.asp?frame=true

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Thanks, I'll find another way to get the mac address. Too bad I have to do
it in a non-dot-net way though...

/Magnus
 
Hi Magnus,

I replied you in another thread "Finding the mac address?", please check it.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top