[AGENT++] Agent++Win32 Questions
Frank Fock
fock at agentpp.com
Wed Jan 28 19:07:12 CET 2004
Dave,
Dave White wrote:
>1. The Agent++ web site and the Agent++Win32 API README say that Snmp++
>and Agent++ have to be compiled with _NO_THREADS defined. However,
>agentX++win32master requires AgentX++, and AgentX++ will not compile
>because it (in agentx_threads.h) requires that threads are enabled in
>Agent++. What problems are caused from enabling threads in Snmp++ and
>Agent++?
>
>
>
Defining _NO_THREADS must only be used when creating a Win32 *subagent*
with AGENT++Win32. When creating a *master* agent, _THREADS has to be
defined.
This is not explicitly written in the README.
>
>
>2. With threads enabled, I can build the agentX++win32master.exe file
>but it is not yet a direct replacement for snmp.exe which is a Windows
>Service. I can run the executable as a stand-alone program, but it does
>not have support built into it for a Windows Service. I cannot see
>anything in the source code that calls any of the Windows Service
>functions. Consequently, when I follow the README instructions that
>say:
>
>
>
> 1. Stop the SNMP Service.
>
> 2. Backup the existing agent 'snmp.exe' ...
>
> 3. Copy the 'agentx++win32master.exe' ...
>
> 4. Start the SNMP service again. That's all.
>
>
>
>I find that the "service" will be terminated after 30 seconds because it
>is not a real service. What am I missing? Or are there plans to add
>the code required to interact with the service manager so it behaves as
>any other Windows service?
>
>
>
>
Yes, you are right. The code available on the AGENT++ is missing the needed
service calls. A later version will provide these calls integrated in the
MasterAgentXMibWin32 class. The README is incorrect for the current version.
But it should not be a big problem to add this functionality to the
current source base.
Hope this helps.
Best regards,
Frank
More information about the AGENTPP
mailing list