Invalid Parametes value
Posted
by Sheery
on Stack Overflow
See other posts from Stack Overflow
or by Sheery
Published on 2010-04-20T06:30:07Z
Indexed on
2010/04/20
6:33 UTC
Read the original article
Hit count: 315
c#
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);
}
© Stack Overflow or respective owner