| Dart Home | PowerTCP Mail for ActiveX | Custom Development | Reply | PowerTCP Mail for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Mail for ActiveX Topic: Add on To Property returns error |
| horst ruppert@staware.com From: Starnberg, Germany Posts: 34 Member Since: 11/23/04 |
posted January 29, 2005 12:05 PM I get an »Parameter 2 of the method used is invalid or not appropriate.« error message when calling Add inside To property of an message-object sample: m_Msg->To->Add(bstrToBuffer, 1); I'm using VC so I seemingly have to add that 1 as index. Why do Iget that error then? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted January 29, 2005 12:13 PM Please see the sample VC app. It shows the proper way to do this. |
| horst ruppert@staware.com From: Starnberg, Germany Posts: 34 Member Since: 11/23/04 |
posted January 31, 2005 7:00 AM Ok, now had a look at your sample app. The problem is still occuring. And yes I changed that "To" into "GetTo()" as the sample said. There have some questions occured to me from that sample: 1. Docu says param to should be in 1 to number+1. Is that valid for vb only? Whats valid for vc? 2. Why is a ';' set instead of that address in my _bstr_t variable when I enter a zero (as it's in your sample) as param 2? (I checked that the address is stored in that _bstr_t. It's in there.) The only difference I found was that I am handling that entering of the To-field inside another subroutine and that souldn't affect the whole thing the way it does. To be of help for you I show you part f my code as it's done now! bool CswDartMessage::SetHeaderTo(CString& strToBuffer) { ... bstrToBuffer = _bstr_t(strToBuffer); retval = SetHeaderTo(bstrToBuffer); ... } bool CswDartMessage::SetHeaderTo(_bstr_t& bstrToBuffer) { ... m_Msg->GetTo()->Add(bstrToBuffer, 0); ... } |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted January 31, 2005 11:02 AM Regarding the index, it starts at 1. There would not be a message '0' Regarding the remainder of your post, I'm sorry, but I'm having trouble understanding what you are asking. The VC6 sample app works fine for me, I don't get any errors when I run it. You may want to contact sales@dart.com to discuss more advanced support options. |
| Reply | PowerTCP Mail for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|