Author |
|
Guests Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 26 May 2005 at 5:07am | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 26 May 2005 at 8:46am | IP Logged
|
|
|
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 |
|
|
Guests Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 26 May 2005 at 9:56am | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 26 May 2005 at 10:25am | IP Logged
|
|
|
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 |
|
|