Search The ForumSearch   RegisterRegister  LoginLogin

General Issues

 AfterLogic Forum : General Issues
Subject Topic: Need example with C++ without MFC Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Guests
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 26 May 2005 at 5:07am | IP Logged Quote Guests

Hello,

I'm not able to write a console application to work with MailBee.SMTP object. I've seen the VC++ 6.0 example and it works, but when I start a emtpy project on Microsoft Development Environment VC++ 7.1 and write the same related code from the example,it doen't work.

Debugging, I see that a call to
     SCODE sc = CoCreateInstance(clsid, NULL, CLSCTX_ALL | CLSCTX_REMOTE_SERVER,
           IID_IUnknown, (LPLP)&lpUnknown);
fails. I test it with a MFC application and then it works.

Our source code doesn't not use MFC, so I need a way to use the MailBee.dll in some way like a wrapper class or something else.

May someone pass an example using the trial MailBee.dll with MS VC++ 7.1 without MFC ?

Thanks in advance.


Back to Top View Guests's Profile Search for other posts by Guests
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 26 May 2005 at 8:46am | IP Logged Quote Alex

Perhaps, you just forgot to add CoInitialize(NULL) in the startup section of your code.

Every app which uses COM/OLE must start with CoInitialize(NULL) and end with CoUninitialize(). Also, if you create threads, every thread must also initialize OLE in the same way.

Because MFC uses OLE, MFC app has COM already initialized. When MFC is not used, you must manually call CoInitialize/CoUninitialize.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Guests
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 26 May 2005 at 9:56am | IP Logged Quote Guests

Yes it works, thanks Alex.

Do you have some kind of class that hides these initializations or is the Mailbee.h, the only interface distributed inside the development kit ?

I'm evaluating your SW in order to use it. Do you have tested your .dll against MS VC++ 7.1 environment ? I assume that your latest supported version is VC++ 6.0.

What kind of development support do you offer ?

Thansk in advance.

Back to Top View Guests's Profile Search for other posts by Guests
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 26 May 2005 at 10:25am | IP Logged Quote Alex

Quote:
Do you have some kind of class that hides these initializations or is the Mailbee.h, the only interface distributed inside the development kit?

MailBee.h is generated when you create a project which uses MailBee.dll (in fact, #import directive generates it). MailBee package does not include any .h files (or helper C/C++ files).

Quote:
I'm evaluating your SW in order to use it. Do you have tested your .dll against MS VC++ 7.1 environment ? I assume that your latest supported version is VC++ 6.0.

Although we have not specifically tested MailBee under 7.1 version, I believe there should not be any problems. However, if you encounter any issues, please let us know.

Quote:
What kind of development support do you offer?

We provide free unlimited technical support (via email and forum) regarding usage of MailBee products by both trial and registered users.

Regards,
Alex

Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide