DLLImport C issues netsnmp library windows app

  • Thread starter Thread starter Whidbey Wave
  • Start date Start date
W

Whidbey Wave

Hi ,
Of course sometimes, some of us have these weird DLLImport issues.
I am using Net-snmp library from http://www.net-snmp.org. While
creating a prototype as console application it worked fine, but as
windows application it fails to respond correctly.
Verified by sniffer, the windows app does not even reaches TCP/IP
network layer, and it returns no error.

The function which I imported from this library are:
init_snmp, snmp_set and snmp_get.

Any working C# code relating to these calls would be cool.
i defined the set and get as below:

[DLLImport("netsnmp.dll")]
private static extern int snmp_set(System.String agent, System.String
mib, System.String type, System.String val);

[DLLImport("netsnmp.dll")]
private static extern int snmp_get(System.String agent, System.String
mib, ref System.Text.StringBuilder val);

Thank you.
:-)
 
Do not bother over this problem, as it is no problem. Last night there
was a tornado, due to which my machine got reset, and everything works
fine today. Moral of my story, don't forget to reset machine, for such
weird errors.
Have a nice day
:-)
 
Back
Top