D
Dkds.Naidu
Hi folks,
I am Naidu. I am developing ATL COM Addin for MS Outlook.I am trying to
get the exact body of incoming mails of Outlook.I can get the exact body
of English mails. I can't get the exact body of Non-English mails.
I am giving rough code. Please correct me.
STDMETHODIMP CExchangeAddin::OnDelivery(IExchExtCallback *lpExchangeCallback)
{
LPMESSAGE lpMessage= NULL;
LPMDB lpMdb = NULL;
ULONG ulPropCount = 0;
LPSPropValue lpMessageProps = NULL;
if (SUCCEEDED(lpExchangeCallback->GetObject(&lpMdb, (LPMAPIPROP*)
&lpMessage)))
{
static SizedSPropTagArray(1,PropTagArray) ={1, {PR_BODY}};
if (SUCCEEDED(lpMessage->GetProps((LPSPropTagArray)
&PropTagArray,0,&ulPropCount,&lpMessageProps)))
{
if (PROP_TYPE(lpMessageProps[0].ulPropTag) != PT_ERROR)
{
MessageBox(NULL,lpMessageProps[0].Value.lpszA,"Ascii
Text",MB_OK);//I can get the English mail body.
//How Can I get the CHINESE text.
//How can I know this mail is chinese(non-english)
mail or English mail.
}//End of PR_BODY
}//End of GetProps
}//End of GetObject
return S_FALSE;
}//End of OnDelivery
Thanks in advance.
Regards,
I am Naidu. I am developing ATL COM Addin for MS Outlook.I am trying to
get the exact body of incoming mails of Outlook.I can get the exact body
of English mails. I can't get the exact body of Non-English mails.
I am giving rough code. Please correct me.
STDMETHODIMP CExchangeAddin::OnDelivery(IExchExtCallback *lpExchangeCallback)
{
LPMESSAGE lpMessage= NULL;
LPMDB lpMdb = NULL;
ULONG ulPropCount = 0;
LPSPropValue lpMessageProps = NULL;
if (SUCCEEDED(lpExchangeCallback->GetObject(&lpMdb, (LPMAPIPROP*)
&lpMessage)))
{
static SizedSPropTagArray(1,PropTagArray) ={1, {PR_BODY}};
if (SUCCEEDED(lpMessage->GetProps((LPSPropTagArray)
&PropTagArray,0,&ulPropCount,&lpMessageProps)))
{
if (PROP_TYPE(lpMessageProps[0].ulPropTag) != PT_ERROR)
{
MessageBox(NULL,lpMessageProps[0].Value.lpszA,"Ascii
Text",MB_OK);//I can get the English mail body.
//How Can I get the CHINESE text.
//How can I know this mail is chinese(non-english)
mail or English mail.
}//End of PR_BODY
}//End of GetProps
}//End of GetObject
return S_FALSE;
}//End of OnDelivery
Thanks in advance.
Regards,