MAPI app causes VB to crashe upon exiting

eyetea
eyetea used Ask the Experts™
on
I have a win2k Adv server. I am using vb6. I am trying to create an application which reads all the emails that arrive to my profile on the exchange server. everything is fine. I am using the olemsg32.dll library to access the exchange server. However, when I simply close the application and not the exe file, vb crashes.
I tried to set all the variables I am using to Nothing including the session variable yet the problem persists.

Any suggestions?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
<flame>Another good reason for throwing Exchange Server out of the window! Surely you don’t think that Microsoft are capable of ever getting something as over complicated as Exchange Server and all of its client components to ever work properly?</flame>

Author

Commented:
If only time can go back I would have chosen to work with sun and oracle products. However, the wind blew the other way around... :) I have to live with that now.

Commented:
I have a similar problem on my home machine, using the CDO library to access my Outlook emails - it runs fine until you stop the executable, or stop the debugger when running through the IDE.  The same application runs perfectly on my works machine, accessing my Exchange mailbox.

Both machines are running XP Pro and Outlook 2000, and I have yet to track down the cause - I posted a similar question several months ago and it was never answered satisfactorily.

Good luck
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

you could always move all your MAPI functions out to an ActiveX exe. That way at worse the ActiveX exe will crash but not your vb app.

Author

Commented:
You know what I did guys? I simply rewrote everything from scratch using the Outlook Application object. Everything is working just fine! Thanks to all :)

Author

Commented:
You know what I did guys? I simply rewrote everything from scratch using the Outlook Application object. Everything is working just fine! Thanks to all :)
Author of the Year 2009

Commented:
eyetea, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

DanRollins -- EE database cleanup volunteer

Author

Commented:
Hello guys,

I know this question is still open since the rocky ages and I am wondering how to close it since it has been long since I have solved it and I am not sure on how to close it. Meaning, there is no button to close or discard this question. Please adivse.
Per recommendation.

YensidMod
EE Moderator

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial