Link to home
Start Free TrialLog in
Avatar of eyetea
eyetea

asked on

MAPI app causes VB to crashe upon exiting

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?
Avatar of inthedark
inthedark
Flag of United Kingdom of Great Britain and Northern Ireland image

<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>
Avatar of eyetea
eyetea

ASKER

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

ASKER

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 :)
Avatar of eyetea

ASKER

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 :)
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
Avatar of eyetea

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of YensidMod
YensidMod

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