c# WMI SNMP retrieve network printers, switches, unix?

I know how to use WMI to query the various Win32_xxxx classes out there and retrieve information from windows OS machines, and i *think* it's possible to query SNMP in a similar way to retrieve information about various SNMP enabled devices on a network, such as printers and switches and possibly even unix machines.

I've been searching around on the internet but cannot find any information on how to achieve this, does anyone know?

sample code would be much appreicated, cheers.

(i'll offer all my remaining points on this one, although i know its not really enough - soz)
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


keep your points and request that this question be deleted.

.NET does not have any native classes or namespaces that allows you to access SNMP directly (the system.Management class only uses WMI).  Go to microsoft.com and query SNMP there.  They have some tutorials and such, but it's all for C++.

The problem with SNMP is that it requires DCOM objects, which are basically distributed DLLs.  You can try to use DLLImport("snmp32.dll") and then create your own wrappers, but SNMP DLLS have their own memory management and what not, so even those most basic queries (get IP Address) requires a lot of effort.

In short, if you really want to do SNMP, use C++ or hope that MS includes SNMP in .net 2.0
gav_jacksonAuthor Commented:
Closed, 155 points refunded.
Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.