I’m trying to integrate a SNMP agent into a Windows application written in native C++.
To make this agent a sub-agent to the Windows SNMP agent, one has to write a DLL that exports certain routines which get called by the Windows SNMP service. So far things are working fine.
Now this DLL needs to fetch the actual information from the application. My first idea was to let the application and DLL use a shared memory block that both sides access, but this makes the information always slighly stale and it would be better for run some code to fetch the latest values when the SNMP request comes in. Both sides will read and write information.
The application already has a TCP based console interface, but the connecting, querying, disconnecting might be a bit heavy-weight for the very frequent requests from SNMP clients.
What are my options to let the DLL communicate with the application directly ?
Named pipes are quite easy to handle, don’t interfere with a firewall and don’t require addtional synchronization (like shared memory does). See MSDN for more informations.