Plugins used both in uninstaller and installer problems should be fixed now

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1817 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-11-22 12:45:38 +00:00
parent 5abd9f0dde
commit 83b92fb6ea
3 changed files with 14 additions and 10 deletions

View file

@ -134,23 +134,26 @@ void Plugins::GetExports(char* pathToDll,bool displayInfo)
bool Plugins::IsPluginCommand(char* token)
{
return GetPluginDll(token, 0) ? true : false;
return GetPluginDll(0, token, 0) ? true : false;
}
char* Plugins::GetPluginDll(char* command, int* dataHandle)
char* Plugins::GetPluginDll(int uninst, char* command, int* dataHandle)
{
char* ret = m_commands.find(command, dataHandle);
if (dataHandle && ret)
*dataHandle = ((int*)m_dataHandles.get())[*dataHandle];
if (dataHandle && ret) {
if (uninst) *dataHandle = ((int*)m_uninstDataHandles.get())[*dataHandle];
else *dataHandle = ((int*)m_dataHandles.get())[*dataHandle];
}
return ret;
}
void Plugins::SetDllDataHandle(char* command, int dataHandle)
void Plugins::SetDllDataHandle(int uninst, char* command, int dataHandle)
{
int idx = -1;
m_commands.find(command, &idx);
if (idx == -1) return;
((int*)m_dataHandles.get())[idx] = dataHandle;
if (uninst) ((int*)m_uninstDataHandles.get())[idx] = dataHandle;
else ((int*)m_dataHandles.get())[idx] = dataHandle;
}
#endif