please dont rip this site Prev Next

SnmpMgrOpen info  Overview  Group

The SnmpMgrOpen function initializes communications sockets and data structures, allowing communications with the specified agent.


    LPSTR lpAgentAddress, 

// name and address of target SNMP agent

    LPSTR lpAgentCommunity, 

// community for target SNMP agent

    INT nTimeOut, 

// communication time-out in milliseconds

    INT nRetries

// communication time-out or retry count



[in] Points to a null-terminated string specifying either a dotted-decimal IP address or a host name that can be resolved to an IP address, an IPX address (in 8.12 notation), or an ethernet address.
[in] Points to a null-terminated string specifying the SNMP community name used when communicating with the agent specified in the lpAgentAddress parameter.
[in] Specifies the communications time-out in milliseconds.
[in] Specifies the communications retry count. The time-out specified in the nTimeOut parameter is doubled each time a retry attempt is transmitted.

Return Values

If the function succeeds, the return value is a pointer to an LPSNMP_MGR_SESSION structure. This structure is used internally and the programmer should not alter it.

If the function fails, the return value is NULL. To get extended error information, call GetLastError. GetLastError may return the SNMP_MEM_ALLOC_ERROR error code, which indicates a memory allocation error.

This function may also return Windows Sockets error codes.

The name and address of the SNMP target, or the string pointed to by the lpAgentAddress parameter, should conform to one of the following forms:


Form (example)

IP Address

IP Hostname

Ethernet Address


IPX Address



Names can be provided for agents only if TCP/IP is loaded and the names are TCP/IP host names. NetBIOS names cannot be supplied for IPX hosts.

See Also

SnmpMgrClose, SnmpMgrRequest

file: /Techref/os/win/api/win32/func/src/f86_4.htm, 4KB, , updated: 2000/4/7 12:19, local time: 2022/5/26 14:31,

 ©2022 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF=""> SnmpMgrOpen</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2022 contributors:
o List host: MIT, Site host, Top posters @20220526
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.

Welcome to!