Hello,
I'm trying to implements snmp stuff into my App and I have problems with
SnmpStrToContext to do his job.
I Declared :
[DllImport("Wsnmp32")]
private static extern IntPtr SnmpStrToContext(
IntPtr session,
ref psmiOCTETS ptrsmiOCTETS);
with
struct psmiOCTETS
{
public long len;
public IntPtr ptr;
}
or
[DllImport("Wsnmp32")]
private static extern IntPtr SnmpStrToContext(
IntPtr session,
ref tabCsmiOCTETS smiOCTETS);
with
struct tabCsmiOCTETS
{
public long len;
public char[] ptr;
}
But nothing, I always have an SNMPAPI_CONTEXT_INVALID Error.
I use "public" or "public\0" string as context.
Thanks for help.