Link to home
Start Free TrialLog in
Avatar of metalaureate
metalaureateFlag for United States of America

asked on

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?

Avatar of PaulHews
PaulHews
Flag of Canada image

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.
Avatar of metalaureate

ASKER

How do I do that? Without closing the IDE and opening it again?
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.
Oh, well, of course I do that! It isn't any of that.
ASKER CERTIFIED SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JohnBPrice
JohnBPrice

Do you do AspPop.ClosePop3 before you destroy the object?  You are using version 2.0?
Yes, I do, and I am using v. 2.5