From: pramod on

Hi All,

I am trying to write an entry into SIM phone book. Here's the code.

SIMPHONEBOOKENTRY spbe;
memset(&spbe,0,sizeof(SIMPHONEBOOKENTRY));
spbe.cbSize = sizeof(SIMPHONEBOOKENTRY);
_tcsncpy(spbe.lpszText,_T("somename");
_tcsncpy(spbe.lpszAddress,_T("123-456-7890");
spbe.dwParams = SIM_PARAM_PBE_TEXT | SIM_PARAM_PBE_ADDRESS;
HRESULT result = SimWritePhonebookEntry(hSim,SIM_PBSTORAGE_SIM,iEntry,&spbe);

But I get an E_INVALIDARG as the error return value. Where am I going wrong?

Thanks