Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/161.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 如何在Windows 10上安装自定义SNMP扩展代理?_C++_Windows_Operating System_Snmp - Fatal编程技术网

C++ 如何在Windows 10上安装自定义SNMP扩展代理?

C++ 如何在Windows 10上安装自定义SNMP扩展代理?,c++,windows,operating-system,snmp,C++,Windows,Operating System,Snmp,我已经开发了一个定制的snmp扩展代理,可以与windowsnmp服务协同工作。我已经使用Microsoft提供的snmp.h接口在C++中实现了,我正在创建一个64位dll,用作扩展代理 要将此dll作为扩展代理安装,我在HKEY\U LOCAL\U MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents下添加了一个注册表: MyAgent REG_SZ SOFTWARE\MyAgent\C

我已经开发了一个定制的
snmp
扩展代理,可以与
windowsnmp服务
协同工作。我已经使用Microsoft提供的snmp.h接口在
C++
中实现了,我正在创建一个64位
dll
,用作扩展代理

要将此dll作为扩展代理安装,我在
HKEY\U LOCAL\U MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents
下添加了一个注册表:

MyAgent    REG_SZ    SOFTWARE\MyAgent\CurrentVersion
HKEY\U LOCAL\U MACHINE\SOFTWARE\MyAgent\CurrentVersion
下,我创建了另一个注册表,将dll的路径指定为:

Pathname   REG_EXPAND_SZ    C:\Program Files\testing\MyAgent.dll
当我在系统事件日志中执行此操作时,我不断发现SNMP服务忽略扩展代理dll C:\Program Files\testing\MyAgent.dll,因为它丢失或配置错误。

该代理是无陷阱代理。它从
snmp.h
中公开
SnmpExtensionInit
SnmpExtensionQuery
函数。我不知道是什么搞砸了。我需要一个32位的dll吗?internet上的所有资源都非常陈旧,请参考
Windows NT
。我需要在较新的操作系统上配置它,如
windows10
windowsserver2016
。任何建议都会有帮助


同样的错误也有类似的问题,但都与32位dll的迁移有关。我是从64位开始的。

因为SNMP进程仍然是32位的,所以需要设置密钥

HKEY\U LOCAL\U MACHINE\SOFTWARE\WOW6232Node\MyAgent\CurrentVersion


但是我发现SnmpExtensionInit没有被称为

,因为SNMP进程仍然是32位密钥

HKEY\U LOCAL\U MACHINE\SOFTWARE\WOW6232Node\MyAgent\CurrentVersion

但是我发现SnmpExtensionInit没有被调用