That was my guess but I was not sure since I am not familial with Pascal syntax. In C++, the syntax would clearly indicate that the returned value is a pointer to a TSNMPMIB object ( TSNMPMIB * MIBBYIndex(int index) ) but the definition of the routing in the SnmpSend.pas file is:
function MIBByIndex(Index: Integer): TSNMPMib which looks to me as the return value is being passed by value and not by reference. But once again let me state that my coding skills are a bit rusty. Thanks for the reply. Jeff -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of theo Sent: Friday, February 16, 2007 3:05 AM To: Ararat Synapse Subject: Re: [Synalist] Access violation problem Jeff Douglass schrieb: > > and on the next SNMP get reply I get an access violation. Does the > MIBByIndex() return a pointer to a TSNMPMib object? I ask this because I am > not familure with the pascal syntax for functions but if I change the code > to: > > I'd say yes. And this seems not very language specific (I dont' know much about C++) What else would you expect this line to do ? : tempMIBptr = SNMPInterfaceptr->Reply->MIBByIndex(i); In this case tempMIBptr = new TSNMPMib; is useless and delete tempMIBptr; destroys something you dont' "own" in this procedure. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ synalist-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synalist-public ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ synalist-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synalist-public
