Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iMsg Interface

Status
Not open for further replies.

HansDuifhuis

Programmer
Feb 26, 2002
1
NL
Hi,
I'm using the iMsg interface in 'OnDelivery' event sink on an SMTP MCIS server. I have no problem extracting eg. the current recipient using:


HRESULT STDMETHODCALLTYPE CSmtpAdd::OnDelivery(IMsg *pMsg)
{
char szRecipient[MAX_RECIPIENT];
VARIANT szRCPT_TOs;
DWORD cbSize = 0;

....

cbSize = sizeof(szRecipient);
pMsg->GetStringA("current rcpt", &cbSize, szRecipient);

....

But I'm having difficulties using the following:

VariantInit(&szRCPT_TOs);
pMsg->GetVariantA("rcpt to", &szRCPT_TOs);

It compiles nicely, but gives an unspecified (E_FAIL) error at runtime.

Can anyone help me please? I'm not used to working with VARIANT's...

Hans.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top