heqj06183
小狐狸
小狐狸
  • UID25963
  • 注册日期2008-08-25
  • 最后登录2008-09-05
  • 发帖数8
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
阅读:1754回复:1

Example of Sending a Stream的例子

楼主#
更多 发布于:2008-08-25 11:56
我在用Gekco plugin API reference里面的发送流的例子,发现不成功,本该创建一个页面显示一个字符串,但是我的结果是重定向到一个空的页面,有人知道什么原因吗?

NPStream* stream;
char* myData = "<HTML><B>This is a message from my plug-in!</B></HTML>";
int32 myLength = strlen(myData) + 1;
/* Create the stream. */
err = NPN_NewStream(instance, "text/html", "_blank", &stream);
/* Push data into the stream. */
err = NPN_Write(instance, stream, myLength, myData);
/* Delete the stream. */
err = NPN_DestroyStream(instance, stream, NPRES_DONE);

在线等。。。
heqj06183
小狐狸
小狐狸
  • UID25963
  • 注册日期2008-08-25
  • 最后登录2008-09-05
  • 发帖数8
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
1楼#
发布于:2008-08-25 11:56
Nobody?
游客

返回顶部