rv40_dll_stub.c
上传用户:dangjiwu
上传日期:2013-07-19
资源大小:42019k
文件大小:2k
- #include <e32std.h>
- #include <string.h>
- #include "hxglobalmgr.h"
- #ifndef HELIX_CONFIG_SYMBIAN_PLATFORM_SECURITY
- GLDEF_C TInt E32Dll(TDllReason reason)
- {
- if (reason == EDllProcessDetach)
- {
- HXGlobalManager* pGM = HXGlobalManager::Instance();
- if (pGM)
- {
- pGM->Shutdown();
- }
- }
- return(KErrNone);
- }
- #endif /* HELIX_CONFIG_SYMBIAN_PLATFORM_SECURITY */
- 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}
- };
- 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;
- }