首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >新手chrome-plugin开发人员需要NPAPI入门帮助

新手chrome-plugin开发人员需要NPAPI入门帮助
EN

Stack Overflow用户
提问于 2011-10-28 23:33:25
回答 1查看 282关注 0票数 0

虽然我之前只在C++中做了很少的工作,但是我正在尝试编译以下chrome插件,这样我就可以看到它是如何工作的,并以此为起点来开发类似的东西:http://code.google.com/p/minimizetotray/source/browse/trunk/?r=17#trunk%2FDLL

到目前为止,我已经执行了以下步骤:下载源代码,在MS Visual Studio Pro 2008中打开它,并获得它所要求的一些SDK和头文件,包括最新版本的NPAPI头文件:http://npapi-sdk.googlecode.com/svn/trunk/headers/

现在,我在尝试编译时遇到以下错误,并且不知道如何对其进行排序。

代码语言:javascript
复制
    Compiling...
JSMethods.cpp
c:\documents and settings\dell customer\desktop\dll\jsmethods.cpp(92) : error C2039: 'UTF8length' : is not a member of '_NPString'
        c:\program files\microsoft visual studio 9.0\vc\include\plugin\npruntime.h(85) : see declaration of '_NPString'
c:\documents and settings\dell customer\desktop\dll\jsmethods.cpp(101) : error C2039: 'UTF8characters' : is not a member of '_NPString'
        c:\program files\microsoft visual studio 9.0\vc\include\plugin\npruntime.h(85) : see declaration of '_NPString'

等等。

除了这两个错误之外,这一切看起来都很花哨,它没有要求丢失包含或任何东西。感谢任何人的帮助!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-10-28 23:55:33

除非我在最新的SDK中搞错了,否则_NPString结构被定义为...

代码语言:javascript
复制
typedef char NPUTF8;
typedef struct _NPString {
    const NPUTF8 *UTF8Characters;
    uint32_t UTF8Length;
} NPString;

在您的代码中,您调用的是UTF8length而不是UTF8Length (大写的L)。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7931471

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档