[AGENT++] Using agent++ with multithreading in a MFC application

Jochen Katz katz at agentpp.com
Fri Jan 5 21:13:55 CET 2007


Hi,

> I tried to build a manager-agent pair of applications using MFC ( with
> Microsoft Visual Studio 2005)and snmp++ v3.2 - agent++ v3.5. I included 
> 
> #define _NO_SNMPv3
> 
> #define _NO_LOGGING

IMHO when starting with snmp++/agent++, defining _NO_LOGGING is not the
first thing you should do...

> The manager application send a get() request. The agent crashes to
> threadPool->execute(mt) with the error: Unhandled exception at 0x10029503
> (agent_pp.dll) in agent.exe: 0xC0000005: Access violation reading location
> 0x00000000.

> ------>>>    threadPool->execute(mt);

If at this point threadPool is null, a call to mib->init(); is missing.
If this does not help or you already call init(), you can comment out in
agent++.h the
#define AGENTPP_USE_THREAD_POOL

Regards,
  Jochen




More information about the AGENTPP mailing list