本文介绍了如何将char *转换为TMemorystream *类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 1.如何将char *保存到图像文件中? 2.如何将char *转换为TMemorystream *类型?1.how to save char * to a image file?2.how to convert char * to TMemorystream * type?void process(char* data, int length){ //the data is a image} 我尝试按照代码,但显示空白照片。I have try follow code,but display a blank photo.TMemoryStream * MemoryImageStream=new TMemoryStream; MemoryImageStream->Position=0; MemoryImageStream->Write(photo,len);推荐答案TMemoryStream * MemoryImageStream=new TMemoryStream; MemoryImageStream->Position=0; MemoryImageStream->Write(photo,len); 更改为:change it to:TMemoryStream * MemoryImageStream=new TMemoryStream(len); MemoryImageStream->Position=0; MemoryImageStream->Write(photo,len); 参见: http ://msdn.microsoft.com/en-us/library/system.io.memorystream.aspx?cs-save-lang = 1& cs-lang = cpp#code-snippet-1 [ ^ ] 这篇关于如何将char *转换为TMemorystream *类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-07 14:36