I'm writing an plugin and it gets into [INVALID] section in pluginreg.dat file on Windows. I think there is a problem in my npplugin.rc file.
In npplugin.def file everything is correct:
LIBRARY
EXPORTS
NP_GetEntryPoints @1
NP_Initialize @2
NP_Shutdown @3
But neither NP_GetEntryPoints nor NP_Initialize is called.
To install plugin I put it into %APPDATA%/Mozilla/plugins directory.
Here is npplugin.rc code:
// 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
#if 0
/////////////////////////////////////////////////////////////////////////////
// Russian (Russia) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // Russian (Russia) resources
/////////////////////////////////////////////////////////////////////////////
#endif
/////////////////////////////////////////////////////////////////////////////
// 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 4,5
PRODUCTVERSION 4,5
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", "MyCompany Ltd."
VALUE "FileExtents", "myext"
VALUE "FileOpenName", "My File"
VALUE "FileDescription", "NPPlugin for me"
VALUE "FileVersion", "4.5"
VALUE "InternalName", "npMyPlugin"
VALUE "Language", "English (United States)"
VALUE "LegalCopyright", "Copyright (C) MyCompany Ltd. 2012"
VALUE "MIMEType", "application/x-myplugin"
VALUE "OriginalFilename", "npMyPlugin.dll"
VALUE "ProductName", "My NPPlugin"
VALUE "ProductVersion", "4.5"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
My question is where is an error or what is missing?