Windows 7 Ping works from command line but not in homegrown application

The company I work for has an application that was developed in house that uses the ping command.  Here is a description of the problem as written by company product support:

"For some time now we have been plagued with problems using SNMP devices on certain loads.
The Traps, GETs, SETs, and MIB walk all work fine.

The problem is with the "Ping" command issued by the application periodically to each SNMP network element (NE) to verify its presence on the network.
As soon as the application begins operations, it attempts to "Ping" each NE, and it continues to do so once each minute (user adjustable) forevermore.

On most installations (post Windows XP), this results in a "Socket Initialization Error" (this is what we see in the debug window)."

All computers that are running the application can successfully ping targets from the command line.  But the ping initiated from the application fails.  The application is currently working on one Windows 2008 Server and one Windows 7 64-bit PC but we cannot find a difference between these installations and the ones where the application does not work.  The problem occurs in both 32 and 64 bit versions of Windows 7.  I have disabled Windows Firewall and removed Symantec Endpoint Protection from a test PC but the results have not changed. I have also tried disabling IPv6.

I am at a complete loss.  Any ideas?
HankCashThe ManAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

well, did this at some point work with windows 7 pcs or did this set up never work at all?

from my perspective this is related to the application - as long as the code is at fault there is not much you can do..

hand this back to the programmers - maybe they can extrapolate the error seen here.

as to WHY this is happening:  i'm not good at intepreting but it seems to me that the program tries to access windows features but cannot because the way of addressing them as changed?
there SHOULD be also a change report from microsoft on this - just my guessing can't help you much here, sorry.
HankCashThe ManAuthor Commented:
The application does work on some Windows 7 computers. If it didn't work at all the problem would be more clear cut.  There will not be any further development of the application for reasons that I shouldn't get into.
HankCashThe ManAuthor Commented:
I solved the problem.  The application needs to be running in XP Compatibility Mode in order for the ping function to work correctly.

Some installations of the application had already been set to work in Compatibility Mode because of an earlier problem we found where the application would only work when being run by the same user who did the install.  Setting the application to run in XP SP2 Compatibility Mode solved this problem as well.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HankCashThe ManAuthor Commented:
I selected my solution because it solved the problem.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.