📄 rv20_dll_stub.c
字号:
#include <e32std.h>
#include <string.h>
#include "hxglobalmgr.h"
GLDEF_C TInt E32Dll(TDllReason reason)
{
if (reason == EDllProcessDetach)
{
HXGlobalManager* pGM = HXGlobalManager::Instance();
if (pGM)
{
pGM->Shutdown();
}
}
return(KErrNone);
}
struct SymbolEntry {
const char* m_pSymbolName;
int m_ordinal;
};
static const struct SymbolEntry z_symbolTable[] = {
{"GetSymbolOrdinal", 1},
{"PNCodec_Open", 2},
{"PNCodec_Close", 3},
{"PNCodec_GetUIName", 4},
{"PNCodec_GetVersion", 5},
{"PNCodec_QueryMediaFormat", 6},
{"PNCodec_PreferredMediaFormat", 7},
{"PNCodec_GetMediaFormats", 8},
{"PNCodec_StreamOpen", 9},
{"PNCodec_Input", 10},
{"PNStream_Close", 11},
{"PNStream_SetDataCallback", 12},
{"PNStream_GetStreamHeaderSize", 13},
{"PNStream_GetStreamHeader", 14},
{"PNStream_Input", 15},
{"PNStream_SetOutputPacketSize", 16},
{"PNStream_GetInputBufferSize", 17},
{"PNStream_GetProperty", 18},
{"PNStream_SetProperty", 19},
{"PNStream_OpenSettingsBox", 20},
{"PNStream_GetIPNUnknown", 21},
{"SetDLLAccessPath", 22}
};
extern "C"
int GetSymbolOrdinal(const char* pSymbolName)
{
int ret = 0;
int numSymbols = sizeof(z_symbolTable) / sizeof(struct SymbolEntry);
int i;
if( NULL != pSymbolName )
{
for(i = 0; !ret && (i < numSymbols); i++)
{
if (!strcmp(pSymbolName, z_symbolTable[i].m_pSymbolName))
{
ret = z_symbolTable[i].m_ordinal;
break;
}
}
}
return ret;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -