Home |
RTTarget-32 Programming Manual Function RTSetDLLNameTranslation System Management BIOS (SMBIOS) Advanced Programmable Interrupt Controller (APIC) |
Function RTSetDLLNameTranslationFunction RTSetDLLNameTranslation can be used to instruct function LoadLibrary to replace DLL names with other names. typedef struct { const char * Name; const char * NewName; } RTNameTable; void RTSetDLLNameTranslation(const RTNameTable * NameTable); ParametersNameTablePointer to an array of RTNameTable structures with the names to be translated. The last entry on the array must be {NULL,NULL}. Parameter NULL removes a previously installed DLL name translation table. Win32 API functions LoadLibrary and GetModuleHandle will scan the tables supplied through this function non case sensitive for the name they have received as a parameter. If found, the name is replaced with RTNameTable.NewName. Exampleconst RTNameTable DLLNames[] = { { "Version.dll", "Kernel32.dll" }, { NULL, NULL } }; ... RTSetDLLNameTranslation(DLLNames); ... H = LoadLibrary("Version.dll"); The code above would produce a handle to the On Time RTOS-32 system module. Likewise, if the application loads a different DLL which in turn contains DLL function imports to Version.dll, the DLL would load successfully if the system module exports all required functions, even if Version.dll is not present.
|