/
np_winmain.cpp
45 lines (36 loc) · 1.01 KB
/
np_winmain.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**********************************************************\
Default auto-generated np_winmain.cpp
This file contains the entrypoints for a windows NPAPI
plugin. Don't change this unless you know what you're
doing!
\**********************************************************/
#include "Win/win_common.h"
#include "NpapiTypes.h"
#include "NpapiPluginModule.h"
using namespace FB::Npapi;
FB::Npapi::NpapiPluginModule *module = NULL;
void initPluginModule()
{
if (module == NULL) {
module = new NpapiPluginModule();
NpapiPluginModule::Default = module;
}
}
NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs)
{
initPluginModule();
module->getPluginFuncs(pFuncs);
return NPERR_NO_ERROR;
}
NPError OSCALL NP_Initialize(NPNetscapeFuncs* pFuncs)
{
initPluginModule();
module->setNetscapeFuncs(pFuncs);
return NPERR_NO_ERROR;
}
NPError OSCALL NP_Shutdown()
{
delete module;
module = NULL;
return NPERR_NO_ERROR;
}