Invalid Parametes value
- by Sheery
Hi Guys,
I have an application build in C#, for saving sms, MMS and contacts from the mobile attached via data cable. i am able to save sms and contacts but it gives an error of invalid parameters,
my code for saving is
if (iRet == PCCSErrors.CONA_OK)
{
dataVersit = (CAContentAccess.CADataDefinitions.CA_DATA_VERSIT)Marshal.PtrToStructure(bufData, typeof(CAContentAccess.CADataDefinitions.CA_DATA_VERSIT));
byte[] bVersitObject = new byte[dataVersit.iDataLength];
Marshal.Copy(dataVersit.pbVersitObject, bVersitObject, 0, dataVersit.iDataLength);
System.IO.Stream ios = System.IO.File.Open(fileDlg.FileName, System.IO.FileMode.Create);
ios.Write(bVersitObject, bVersitObject.GetLowerBound(0), dataVersit.iDataLength);
ios.Flush();
ios.Close();
}
else
{
PCCAPIUtils.ShowErrorMessage("CAReadItem", iRet);
}