typedef struct {
VarBind * list;
int len;
} VarBindList;
//winapi函数原型:
int SnmpMgrRequest(
IN void* session,
IN BYTE requestType,
IN OUT VarBindList *variableBindings,
OUT long *errorStatus,
OUT long *errorIndex
);
//c#中的声明:
[DllImport("mgmtapi.dll", EntryPoint = "SnmpMgrRequest", SetLastError = true,
CharSet = CharSet.Ansi,ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern bool SnmpMgrRequest(
string Session,
Byte RequestType,
ref VarBindList variableBindings,
ref long errorStatus,
ref long errorIndex
);
问题:
1. 该声明是否正确?
2. 输入参数VarBindList 该怎么封装。
望广大高手多多指导
posted on 2007-12-18 15:58
sopper 阅读(131)
评论(0) 编辑 收藏