Retrieve the customer details
Example code
CComPtr<ICustomer>m_ICustomer;
CString strCustId,strFieldName;
VARIANT Val;
BSTR bstrCusId;
HRESULT hr;
hr=m_ICustomer.CoCreateInstance(CLSID_Customer);
if(FAILED(hr))
{
AfxMessageBox(_T("ICustomerInterface initialisation failed"));
return FALSE;
}
m_ICustomer->GetCustomerDetails(strCustId.AllocSysString(),strFieldName.AllocSysString(),&Val);
bstrCusId=Val.bstrVal;
CString strCustDetails(bstrCusId);
strFieldName+=" Field Value";
MessageBox(strCustDetails,strFieldName,MB_ICONINFORMATION|MB_OK);