#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("ADODB","CDO")
#import <cdosys.dll>
#include "stdafx.h"
#include "cdosys.h"
#include "cdosys_i.c"
...
CoInitialize(NULL);
CDO::IMessage* pMsg = NULL;
CDO::IDataSource* pDsrc = NULL;
CDO::IConfiguration* pConfig = NULL;
CDO::FieldsPtr pFields = NULL;
HRESULT hr = CoCreateInstance(CDO::CLSID_Message,
NULL,
CLSCTX_INPROC_SERVER,
CDO::IID_IMessage,
reinterpret_cast<void**>(&pMsg));
hr = pMsg->QueryInterface(CDO::IID_IDataSource, reinterpret_cast<void**>(&pDsrc));
hr = pMsg->QueryInterface(CDO::IID_IConfiguration, reinterpret_cast<void**>(&pConfig));
pConfig->get_Fields(&pFields);
...
pMsg->putref_Configuration(pConfig);
pMsg->put_From(_com_util::ConvertStringToBSTR("s.shurygin@sys4tec.com"));
pMsg->put_To(_com_util::ConvertStringToBSTR("s.shurygin@sys4tec.com"));
pMsg->Send();
...
CoUninitialize();
При компиляции VC все время ругается, что не определен FieldsPtr...
В чем может быть дело — соответствующая директива импорта вроде присутствует на месте?