![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I'm not well versed enough in COM to troubleshoot this problem. Any
help or suggestions will be greatly appreciated. TIA. I am trying to use Redemption but I'm having trouble getting past a compiler error. The error is: c:\.......\OlSmPlug-In\ItemEventHandler.cpp(882): error C2079: 'sMailItem' uses undefined struct 'Redemption::SafeMailItem'. Here is the simple decleration in my code in ItemEventHandler.cpp (882) Redemption::SafeMailItem sMailItem; I ran the installer file you provide as part of the Redemption download. Redemption does show up in Outlook's Add-In Manager and it's checked. Here is my import statement and my SafeMailItem decleration. #import "C:\\Program Files\\Redemption\\Redemption.dll" The import statement is in the same header file as the office mso.dll. I have no problem importing the Office/Outlook files. The redemption.tlh and redemption.tli files are created in my Debug directory. SafeMailItem is declared in the tlh file. Here is my system info: Window XP Pro MS Visual Studio 2003 version7.1.6030 Outlook 2002 SP3 version 10.6838.6845 Redemption 4.6.0.924 |
#2
|
|||
|
|||
![]()
On Jan 12, 11:46*am, Byron wrote:
I'm not well versed enough in COM to troubleshoot this problem. *Any help or suggestions will be greatly appreciated. *TIA. I am trying to use Redemption but I'm having trouble getting past a compiler error. *The error is: *c:\.......\OlSmPlug-In\ItemEventHandler.cpp(882): error C2079: 'sMailItem' uses undefined struct 'Redemption::SafeMailItem'. Here is the simple decleration in my code in ItemEventHandler.cpp (882) Redemption::SafeMailItem sMailItem; I ran the installer file you provide as part of the Redemption download. *Redemption does show up in Outlook's Add-In Manager and it's checked. *Here is my import statement and my SafeMailItem decleration. *#import "C:\\Program Files\\Redemption\\Redemption.dll" The import statement is in the same header file as the office mso.dll. *I have no problem importing the Office/Outlook files. The redemption.tlh and redemption.tli files are created in my Debug directory. *SafeMailItem is declared in the tlh file. Here is my system info: Window XP Pro MS Visual Studio 2003 version7.1.6030 Outlook 2002 SP3 version 10.6838.6845 Redemption 4.6.0.924 You have to create an instance of the Redemption SafeMailItem and initialize it. Are you using ATL? |
#3
|
|||
|
|||
![]()
I'm not using ATL.
On Jan 12, 3:01*pm, wrote: On Jan 12, 11:46*am, Byron wrote: I'm not well versed enough in COM to troubleshoot this problem. *Any help or suggestions will be greatly appreciated. *TIA. I am trying to use Redemption but I'm having trouble getting past a compiler error. *The error is: *c:\.......\OlSmPlug-In\ItemEventHandler.cpp(882): error C2079: 'sMailItem' uses undefined struct 'Redemption::SafeMailItem'. Here is the simple decleration in my code in ItemEventHandler.cpp (882) Redemption::SafeMailItem sMailItem; I ran the installer file you provide as part of the Redemption download. *Redemption does show up in Outlook's Add-In Manager and it's checked. *Here is my import statement and my SafeMailItem decleration. *#import "C:\\Program Files\\Redemption\\Redemption.dll" The import statement is in the same header file as the office mso.dll. *I have no problem importing the Office/Outlook files. The redemption.tlh and redemption.tli files are created in my Debug directory. *SafeMailItem is declared in the tlh file. Here is my system info: Window XP Pro MS Visual Studio 2003 version7.1.6030 Outlook 2002 SP3 version 10.6838.6845 Redemption 4.6.0.924 You have to create an instance of the Redemption SafeMailItem and initialize it. *Are you using ATL?- Hide quoted text - - Show quoted text - |
#4
|
|||
|
|||
![]()
Do you specify the namespace when using #import?
-- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Byron" wrote in message ... I'm not using ATL. On Jan 12, 3:01 pm, wrote: On Jan 12, 11:46 am, Byron wrote: I'm not well versed enough in COM to troubleshoot this problem. Any help or suggestions will be greatly appreciated. TIA. I am trying to use Redemption but I'm having trouble getting past a compiler error. The error is: c:\.......\OlSmPlug-In\ItemEventHandler.cpp(882): error C2079: 'sMailItem' uses undefined struct 'Redemption::SafeMailItem'. Here is the simple decleration in my code in ItemEventHandler.cpp (882) Redemption::SafeMailItem sMailItem; I ran the installer file you provide as part of the Redemption download. Redemption does show up in Outlook's Add-In Manager and it's checked. Here is my import statement and my SafeMailItem decleration. #import "C:\\Program Files\\Redemption\\Redemption.dll" The import statement is in the same header file as the office mso.dll. I have no problem importing the Office/Outlook files. The redemption.tlh and redemption.tli files are created in my Debug directory. SafeMailItem is declared in the tlh file. Here is my system info: Window XP Pro MS Visual Studio 2003 version7.1.6030 Outlook 2002 SP3 version 10.6838.6845 Redemption 4.6.0.924 You have to create an instance of the Redemption SafeMailItem and initialize it. Are you using ATL?- Hide quoted text - - Show quoted text - |
#5
|
|||
|
|||
![]() I do specify using namespace Redemption; following the import line. #import "C:\\Program Files\\Redemption\\Redemption.dll" named_guids using namespace Redemption; I can compile now but I can't assign an Outlook::_MailItemPtr to Redemption::ISafeMailItemPtr. void CMailItemHandler::InlineImage(Outlook::_MailItemPt r mailPtr) // (mailPtr obtained by calling Outlook::_InspectorPtr-GetCurrentItem()) { Redemption::ISafeMailItemPtr pSMItem; pSMItem = mailPtr; // pSMItem is NULL, stepping into the COM code E_NOINTERFACE was returned somewhere in QueryInterface code // I have also tried the following variations and the compiler squaked at me for the assignments. CComPtrRedemption::ISafeMailItem spSMItem; Redemption::ISafeMailItem* pISMItem = NULL; spSMItem = mailPtr; pISMItem = mailPtr; } Thanks for the help! On Jan 12, 7:14*pm, "Dmitry Streblechenko" wrote: Do you specify the namespace when using #import? -- Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy *- Outlook, CDO and MAPI Developer Tool -"Byron" wrote in message ... I'm not using ATL. On Jan 12, 3:01 pm, wrote: On Jan 12, 11:46 am, Byron wrote: I'm not well versed enough in COM to troubleshoot this problem. Any help or suggestions will be greatly appreciated. TIA. I am trying to use Redemption but I'm having trouble getting past a compiler error. The error is: c:\.......\OlSmPlug-In\ItemEventHandler.cpp(882): error C2079: 'sMailItem' uses undefined struct 'Redemption::SafeMailItem'. Here is the simple decleration in my code in ItemEventHandler.cpp (882) Redemption::SafeMailItem sMailItem; I ran the installer file you provide as part of the Redemption download. Redemption does show up in Outlook's Add-In Manager and it's checked. Here is my import statement and my SafeMailItem decleration. #import "C:\\Program Files\\Redemption\\Redemption.dll" The import statement is in the same header file as the office mso.dll. I have no problem importing the Office/Outlook files. The redemption.tlh and redemption.tli files are created in my Debug directory. SafeMailItem is declared in the tlh file. Here is my system info: Window XP Pro MS Visual Studio 2003 version7.1.6030 Outlook 2002 SP3 version 10.6838.6845 Redemption 4.6.0.924 You have to create an instance of the Redemption SafeMailItem and initialize it. Are you using ATL?- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - |
#6
|
|||
|
|||
![]()
Of course you can't, these are two different objects - you need to create an
instance of the Redemption.SafeMailItem object, then set its *em* property to an instance of the Outlook.MailItem object. -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Byron" wrote in message ... I do specify using namespace Redemption; following the import line. #import "C:\\Program Files\\Redemption\\Redemption.dll" named_guids using namespace Redemption; I can compile now but I can't assign an Outlook::_MailItemPtr to Redemption::ISafeMailItemPtr. void CMailItemHandler::InlineImage(Outlook::_MailItemPt r mailPtr) // (mailPtr obtained by calling Outlook::_InspectorPtr-GetCurrentItem()) { Redemption::ISafeMailItemPtr pSMItem; pSMItem = mailPtr; // pSMItem is NULL, stepping into the COM code E_NOINTERFACE was returned somewhere in QueryInterface code // I have also tried the following variations and the compiler squaked at me for the assignments. CComPtrRedemption::ISafeMailItem spSMItem; Redemption::ISafeMailItem* pISMItem = NULL; spSMItem = mailPtr; pISMItem = mailPtr; } Thanks for the help! On Jan 12, 7:14 pm, "Dmitry Streblechenko" wrote: Do you specify the namespace when using #import? -- Dmitry Streblechenko (MVP)http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool -"Byron" wrote in message ... I'm not using ATL. On Jan 12, 3:01 pm, wrote: On Jan 12, 11:46 am, Byron wrote: I'm not well versed enough in COM to troubleshoot this problem. Any help or suggestions will be greatly appreciated. TIA. I am trying to use Redemption but I'm having trouble getting past a compiler error. The error is: c:\.......\OlSmPlug-In\ItemEventHandler.cpp(882): error C2079: 'sMailItem' uses undefined struct 'Redemption::SafeMailItem'. Here is the simple decleration in my code in ItemEventHandler.cpp (882) Redemption::SafeMailItem sMailItem; I ran the installer file you provide as part of the Redemption download. Redemption does show up in Outlook's Add-In Manager and it's checked. Here is my import statement and my SafeMailItem decleration. #import "C:\\Program Files\\Redemption\\Redemption.dll" The import statement is in the same header file as the office mso.dll. I have no problem importing the Office/Outlook files. The redemption.tlh and redemption.tli files are created in my Debug directory. SafeMailItem is declared in the tlh file. Here is my system info: Window XP Pro MS Visual Studio 2003 version7.1.6030 Outlook 2002 SP3 version 10.6838.6845 Redemption 4.6.0.924 You have to create an instance of the Redemption SafeMailItem and initialize it. Are you using ATL?- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiler warning CS0467 for Inspector.Close | Lucy | Outlook - Using Forms | 2 | September 2nd 08 01:05 AM |
Problem using Outlook Redemption VBA code | [email protected] | Outlook and VBA | 8 | June 7th 07 05:00 AM |
Redemption Inbox problem + instability | mirzoni | Outlook and VBA | 9 | December 8th 06 05:51 PM |
Redemption - problem with Save | Martin | Outlook and VBA | 4 | January 31st 06 10:56 AM |
Problem with Sent Items/Redemption | קובץ | Outlook and VBA | 10 | January 12th 06 04:26 PM |