SNMPAPI.DLL Initialization Failure
Keywords: SNMPAPI.DLL initialization failure
Question:
Is there a limit to the number of times you can use SendKeysTo in one WinBatch?There appears to be a limit of 58 SendKeysTo commands before you get the following error:
"Initialization of the dynamic link library C:\WINDOWS\System32\snmpapi.dll failed. The process is terminating abnormally"The size of the string sent via the SendKeysTo command does not appear to matter.I am getting around the problem by using the "Run" command to launch new WinBatch processes as I approach 50ish SendKeysTo commands, but it is kind of a sloppy approach.
Any suggestions?
Answer:
This bug is a result of a complex interaction betwixt tcp/ip networking, SNMP protocols and Winbatch SendKey statements. Fixed in current version of WinBatch.Background:
Some users running NT 4.0 and having large scripts that do a lot of SendKeys reported this error which hangs the script. If they press OK, it continues on for a while and then hangs again.There was a combination WinBatch/Windows SNMP bug that causes the problem you described. Download an update from our website. This bug as fixed in version 96M, and later versions of WinBatch.
It was some kind of resource leak in Windows, which was solved by adding:
IntControl(43,0,0,0,0)which fixes it in earlier versions, prior to WinBatch 96M.
Article ID: W12981Filename: SNMPAPI Dll Problems.txt