SnmpRegister Function Fails on Windows 7
Several years ago I developed an application in PowerBuilder for use on Windows 2000 machines. The application included a feature that sends SNMP requests to Cisco Access Servers and receives responses from the same. Before using the SNMP feature on a Windows 2000 computer, one had to install "Simple Network Management Protocol" under the "Management and Monitoring Tools" in the Add/Remove Windows Components dialog box. This was also true when migrating to Windows XP. When I migrated to Windows 7, the SNMP feature in my application failed when making a function call to SmnpRegister.
Follow up:
The function call to SnmpRegister failed exactly the same way in Windows 2000 and Windows XP if one did not install the Simple Network Management Protocol. I made an assumption that one would need to do the same for Windows 7 but this turned out to be a bad assumption. Windows 7 does have a component to install named Simple Network Management Protocol but it is top-level to "WMI SNMP Provider". I tried installing this component but the problem was not resolved.
It turns out that a Windows service named "SNMP Trap" already exists in a default installation of Windows 7 but the service is not running by default because it is set for manual startup. I manually started the service and my application was happy again. Since I use the SNMP feature in the application fairly frequently, I set the service startup type to automatic. By doing this, the service will already be running when it is needed.
Leave a comment