Why would an .exe hang in the IDE but run when fully compiled?

Hi Experts

I am having reall difficulties trying to ask the right question to solve me problem. Here is another attempt:

I use ASPPop3.dll (from Server Objects) to retrieve mail. I make use of it in a Standard .exe. However, although the .exe runs just fine (and I have tested it very thoroughly) on its own, when I run the code in debug mode in the IDE, three things happen:

1) It runs fine the first time
2) Then the ASPPop3.dll library fails make a connection to the internet (it does even try), just returns an error msg "Range check error", whatever that means (no documentation from serverobjects.com on this error)
3) Then, after a few attempts at running the program in the IDE, the IDE hangs at the point where it calls ASPPop3.dll to check for POP3 headers.

"Hanging application VB6.EXE, version 6.0.81.76, hang module hungapp, version 0.0.0.0, hang address 0x00000000." is one error.
"Fault bucket 02037450." is another.

ASPPop3.dll works fine as in ASP too; I have also tested that thoroughly.

Unfortunately there is no help from the manufacturers.

So, any one give me some intelligent reasons why such code would not work in the IDE?

metalaureateAsked:
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.

PaulHewsCommented:
If it works correctly the first time, it may indicate that it's best to discard the old instance before trying again.  As ASP objects are usually created with limited scope and are destroyed quickly after use, it may be the best approach to try.  Also, try using the DLL with latebinding, the same way you would in an ASP page.
metalaureateAuthor Commented:
How do I do that? Without closing the IDE and opening it again?
PaulHewsCommented:
Dim AspPOP as Object  ' As Object because we are using late binding.

Set AspPOP = CreateObject("Class.String")  'I don't know the class string you use for this object, but you can get it from your ASP application.

'Code to do whatever goes here.

Set AspPOP = Nothing  'Destroy this instance.  If you want to use it again, use the CreateObject call again.
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

metalaureateAuthor Commented:
Oh, well, of course I do that! It isn't any of that.
PaulHewsCommented:
In that case I suggest you take it up with the company that produces the product.  The most likely explanation is that it's a bug of some kind.  If you paid for the control, you should address the quality of service and point out the kind of black eye a question like this, on a major site like Experts Exchange gives them.  If you're still evaluating, I suggest you look elsewhere for a more mature component company.

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
JohnBPriceCommented:
Do you do AspPop.ClosePop3 before you destroy the object?  You are using version 2.0?
metalaureateAuthor Commented:
Yes, I do, and I am using v. 2.5
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
Visual Basic Classic

From novice to tech pro — start learning today.