vc控件向 javascript传递图象数据
我用vc做的Activex控件用这段代码读取图片并返回:
BSTR GetGif()
{
CString strResult;
FILE *fp;
char *pcBuffer = new char [0x4500];
int gifLength;
if((fp = fopen(path,"rb")) == NULL)
{
MessageBox("打开文件失败","提示");
}
gifLength = fread(pcBuffer,sizeof(char),0x4500,fp);
fclose(fp);
pcBuffer[gifLength] = '\0';
strResult.Format("%s",pcBuffer);
delete [] pcBuffer;
return strResult.AllocSysString();
}
其中path包括图片的路径和名字,但是java里面只接受到GIF89a这个版本号,请各位大侠帮忙,怎样把图象的完整数据传递给javascript