Firefox (16.0.2, Windows 7 x64 Professional)가 빈 NPAPI 플러그인을 감지하려고합니다. 여기 내 코드가있다. nplithium.defFirefox에서 NPAPI 플러그인을 감지하지 못했습니다.
#include "npapi.h"
#include "npfunctions.h"
extern "C"
{
NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* functions)
{
if(functions == NULL)
return NPERR_INVALID_FUNCTABLE_ERROR;
if(functions->size < sizeof(NPPluginFuncs))
return NPERR_INVALID_FUNCTABLE_ERROR;
functions->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
functions->newp = NULL;
functions->destroy = NULL;
functions->setwindow = NULL;
functions->newstream = NULL;
functions->destroystream = NULL;
functions->asfile = NULL;
functions->writeready = NULL;
functions->write = NULL;
functions->print = NULL;
functions->event = NULL;
functions->urlnotify = NULL;
functions->getvalue = NULL;
functions->setvalue = NULL;
functions->javaClass = NULL;
return NPERR_NO_ERROR;
}
NPError OSCALL NP_Initialize(NPNetscapeFuncs* functions)
{
return NPERR_NO_ERROR;
}
NPError OSCALL NP_Shutdown()
{
return NPERR_NO_ERROR;
}
}
불행하게도, 샘플 플러그인 및 자습서의 모든 나는 웹에
LIBRARY nplithium
EXPORTS
NP_GetEntryPoints @1
NP_Initialize @2
NP_Shutdown @3
nplithium.rc
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Antek SRL"
VALUE "FileDescription", "Example Lithium"
VALUE "FileVersion", "1.0.0.2"
VALUE "InternalName", "nplithium"
VALUE "LegalCopyright", "Copyright (C) Marco Buzzanca 2012"
VALUE "MIMEType", "application/x-lithium"
VALUE "OriginalFilename", "nplithium.dll"
VALUE "ProductName", "lithium"
VALUE "ProductVersion", "1.0.0.1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
dll_entry.cpp을 발견했습니다
쓸모 없거나 불완전합니다. MDN은 브라우저가이 기능을 기대하는 것에 대한 정보를 거의 제공하지 않기 때문에 (NP_GetEntryPoints는 완전히 문서화되지 않았습니다) 도움이되지 않습니다.
내가 누락 된 자료가 있습니까? 플러그인을 만들려고하지 않고 파이어 폭스에서 감지하고 싶습니다.