Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

hi,
im using motorola v3c,and sdk im using is 3.1.2.
ma requirement is i need to upload images which are in ma phone to da server,
so my query is how to access images in phone through ma application...
is there any specific api to do dat?????

regards
manju

IFileMgr and IFile.

IFileMgr and IFile.

max wrote:IFileMgr and IFile.
im facing problem in loading image data to buffer

pInFile=IFILEMGR_OpenFile(pIFileMgr,"chat.png",_OFM_READ);  IFILE_GetInfo(pInFile,&pInfoVideoFile);iRes=IFILE_Read(pInFile,pMe->buffer,pMe->iJpgFileBodySize);// here im getting ires value 473 iRes=STRLEN(pMe->buffer);// but here data read to da buffer is ires=8;pMe->iJpgFileBodySize=pInfoVideoFile.dwSize; pMe->buffer=(byte*)MALLOC(pMe->iJpgFileBodySize);

so im able to write only 8 byte to da socket...but actually da image size is 473 byte...
secondly im facing problem in creating insatnce for icamera, da return value of createinstance for
icamera classid is 21,so not able to create instance for it
regards
manju

max wrote:IFileMgr and IFile.
im facing problem in loading image data to buffer

pInFile=IFILEMGR_OpenFile(pIFileMgr,"chat.png",_OFM_READ);  IFILE_GetInfo(pInFile,&pInfoVideoFile);iRes=IFILE_Read(pInFile,pMe->buffer,pMe->iJpgFileBodySize);// here im getting ires value 473 iRes=STRLEN(pMe->buffer);// but here data read to da buffer is ires=8;pMe->iJpgFileBodySize=pInfoVideoFile.dwSize; pMe->buffer=(byte*)MALLOC(pMe->iJpgFileBodySize);

so im able to write only 8 byte to da socket...but actually da image size is 473 byte...
secondly im facing problem in creating insatnce for icamera, da return value of createinstance for
icamera classid is 21,so not able to create instance for it
regards
manju

You can't use STRLEN() on binary data -- it's bound to contain a null byte. The return value from IFILE_Read() already tells you that you got 473 bytes.

You can't use STRLEN() on binary data -- it's bound to contain a null byte. The return value from IFILE_Read() already tells you that you got 473 bytes.