void WINAPI _export SetStartupInfo(const struct PluginStartupInfo *aInfo) { gbSetStartupInfoOk = true; //LoadFarVersion - уже вызван в GetStartupInfo INIT_FAR_PSI(::InfoA, ::FSFA, aInfo); DWORD nFarVer = 0; if (InfoA->AdvControl(InfoA->ModuleNumber, ACTL_GETFARVERSION, &nFarVer)) { if (HIBYTE(LOWORD(nFarVer)) == 1) { gFarVersion.dwBuild = HIWORD(nFarVer); gFarVersion.dwVerMajor = (HIBYTE(LOWORD(nFarVer))); gFarVersion.dwVerMinor = (LOBYTE(LOWORD(nFarVer))); } else { _ASSERTE(HIBYTE(HIWORD(nFarVer)) == 1); } } int nLen = lstrlenA(InfoA->RootKey)+16; if (gszRootKeyA) free(gszRootKeyA); gszRootKeyA = (wchar_t*)calloc(nLen,2); MultiByteToWideChar(CP_OEMCP,0,InfoA->RootKey,-1,gszRootKeyA,nLen); WCHAR* pszSlash = gszRootKeyA+lstrlenW(gszRootKeyA)-1; if (*pszSlash != L'\\') *(++pszSlash) = L'\\'; lstrcpyW(pszSlash+1, L"ConEmuLn\\"); StartPlugin(FALSE); }
void WINAPI OnConEmuLoaded(struct ConEmuLoadedArg* pConEmuInfo) { gfRegisterBackground = pConEmuInfo->RegisterBackground; ghPluginModule = pConEmuInfo->hPlugin; if (gfRegisterBackground && gbBackgroundEnabled) { StartPlugin(FALSE/*считать параметры из реестра*/); } }
void WINAPI SetStartupInfoW(void *aInfo) { gbSetStartupInfoOk = true; if (!gFarVersion.dwVerMajor) LoadFarVersion(); if (gFarVersion.dwBuild>=FAR_Y2_VER) FUNC_Y2(SetStartupInfoW)(aInfo); else if (gFarVersion.dwBuild>=FAR_Y1_VER) FUNC_Y1(SetStartupInfoW)(aInfo); else FUNC_X(SetStartupInfoW)(aInfo); //_ASSERTE(gszRootKey!=NULL && *gszRootKey!=0); gbInfoW_OK = TRUE; StartPlugin(FALSE); }
void idaapi run(int arg){ StartPlugin(); }