473,473 Members | 2,074 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DLLImport C issues netsnmp library windows app

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.
:-)
Nov 16 '05 #1
1 4332
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
:-)

in*********@yahoo.com (Whidbey Wave) wrote in message news:<77*************************@posting.google.c om>...
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.
:-)

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Paul Duncan | last post by:
diggityduncs (Programmer) Nov 13, 2003 Hello, I'm tring to use a win32/api dll in c# The vendor I received the dll from doesn't know anything about .net I received two files ACGAPI.DLL +
2
by: Brian Anderson | last post by:
Hello, is it possible to use DllImport to call a DLL in ASP.NET ? Or is it necessarry that my DLL has to be copied into \System32 ? My DLL is a native C++ 7.1 DLL (not managed, no COM, no...
1
by: sharmadeep1980 | last post by:
Hi All, I am facing a very unique problem while compling my project in "Release" build. The project is building in DEBUG mode but giving linking error on Release build. Here is the error:...
2
by: nospam | last post by:
Hello - I am getting a compile error "Expected class, delegate, enum". I am trying to create a Class Library in C# which wraps around an unmanaged DLL that manages a MIDI interface. In my...
1
by: John Dinning | last post by:
(Using VS2005 C# and compact Framework. Target device is running CE5). I am creating a simple visual control (New Control Library project for smart device Windows CE 5), derived from Label, with...
0
by: Nelson R. | last post by:
Greetings, I've already posted this message on aspnet.security group (think its related to security issues), but since didn't get any response, I post it here. -- I have a problem, and been...
9
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I have a win32dll which is a dll to send SMS. I am using Dllimport to call the methods in the dll. In Winform it works well. In Web form the method doesn't work and returns false. (I am debugging...
0
by: vijayaa09 | last post by:
hi, Using netsnmp source code from sourceforge.net ,am establishing connection between agent and manager but, could not retrieve the mib values . when I have gone through netsnmp faqs, I come...
1
by: Larry | last post by:
I have an asp.net application (C#) that calls a web service that uses several c++ dlls which are loaded with DllImport. I put these dlls in a sub-directory off of the bin directory. For example,...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.