sipr_dll_stub.c
上传用户:zhongxx05
上传日期:2007-06-06
资源大小:33641k
文件大小:1k
- #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},
- {"RAOpenCodec", 2},
- {"RAOpenCodec2", 3},
- {"RAGetNumberOfFlavors", 4},
- {"RAGetFlavorProperty", 5},
- {"RASetFlavor", 6},
- {"RASetPwd", 7},
- {"RACloseCodec", 8},
- {"RAGetBackend", 9},
- {"RASetComMode", 10},
- {"RAGetDecoderBackendGUID", 11},
- {"RAGetGUID", 12},
- {"RAInitDecoder", 13},
- {"RADecode", 14},
- {"RAFlush", 15},
- {"RAFreeDecoder", 16}
- };
- 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;
- }