get url from plugin
来源:互联网 发布:js 0除以0 nan 编辑:程序博客网 时间:2024/06/05 07:38
std::string GetUrl(NPP instance)
{
std::string origin;
NPVariant loc_value;
NPVariant href_value;
NPIdentifier href_id = NPN_GetStringIdentifier("href");
NPIdentifier location_id = NPN_GetStringIdentifier("location");
VOID_TO_NPVARIANT(loc_value);
VOID_TO_NPVARIANT(href_value);
do {
NPObject* win_obj;
if (NPN_GetValue(instance, NPNVWindowNPObject, &win_obj) !=
NPERR_NO_ERROR)
{
break;
}
if (!NPN_GetProperty(instance, win_obj, location_id, &loc_value) ||
!NPVARIANT_IS_OBJECT(loc_value))
{
break;
}
NPObject* loc_obj = NPVARIANT_TO_OBJECT(loc_value);
if (!NPN_GetProperty(instance, loc_obj, href_id, &href_value) ||
!NPVARIANT_IS_STRING(href_value))
{
break;
}
std::string href(NPVARIANT_TO_STRING(href_value).utf8characters,
NPVARIANT_TO_STRING(href_value).utf8length);
origin = href;
} while (0);
NPN_ReleaseVariantValue(&loc_value);
NPN_ReleaseVariantValue(&href_value);
return origin;
}
- get url from plugin
- Get parameters from Url
- Get URL from the text
- How to get parameters from the URL?
- Get image from URL and save it
- Get video NSData from ALAsset url iOS
- 框架 from表单get提交url样式
- goagent: 403 Your client does not have permission to get URL /2 from this server
- Your client does not have permission to get URL /2 from this server
- You do not have permission to get URL ‘/’ from this server解决方案
- 怎样使用java读取网页源码 How To Get URL Content In Java | Reading Directly from a URL
- get resource from xml
- Get scratch from ”语录“
- get dimension from sps
- get buffer from CMSampleBufferRef
- get c_function* from lua_State*
- paperclip upload from url
- $.get( url, [data], [callback] )
- jar命令的使用
- 列举ASP.NET页面之间传递值的几种方式
- 克波拉里客户管理系统助企业“强身健体”
- 代码优化的第一步是判定程序热点
- 光驱,软驱,USB的禁用和启用
- get url from plugin
- 关于多线程编程
- org.hibernate.TransientObjectException: object references an unsaved transient instance
- 遭遇ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
- 怎样删除WORD文档中的所有超链接
- 解决浏览器缓存和中文乱码问题
- 关于估价函数的实现-------基于python语言(网络爬虫)
- xls文档的读写改(使用的jxl版本是2.6.8)
- 关于XML解析的测试