void SetStartupInfoW995(void *aInfo) { INIT_FAR_PSI(::InfoW995, ::FSFW995, (PluginStartupInfo*)aInfo); _ASSERTE(FPS_SHOWSTATUSLINE == 0x00000040); _ASSERTE(FPS_SHOWCOLUMNTITLES == 0x00000020); DWORD nFarVer = 0; if (InfoW995->AdvControl(InfoW995->ModuleNumber, ACTL_GETFARVERSION, &nFarVer)) { if (HIBYTE(LOWORD(nFarVer)) == 2) { gFarVersion.dwBuild = HIWORD(nFarVer); gFarVersion.dwVerMajor = (HIBYTE(LOWORD(nFarVer))); gFarVersion.dwVerMinor = (LOBYTE(LOWORD(nFarVer))); } else { _ASSERTE(HIBYTE(HIWORD(nFarVer)) == 2); } } int nLen = lstrlenW(InfoW995->RootKey)+16; if (gszRootKeyW995) free(gszRootKeyW995); gszRootKeyW995 = (wchar_t*)calloc(nLen,2); lstrcpyW(gszRootKeyW995, InfoW995->RootKey); WCHAR* pszSlash = gszRootKeyW995+lstrlenW(gszRootKeyW995)-1; if (*pszSlash != L'\\') *(++pszSlash) = L'\\'; lstrcpyW(pszSlash+1, L"ConEmuBg\\"); }
void SetStartupInfoW1900(void *aInfo) { INIT_FAR_PSI(::InfoW1900, ::FSFW1900, (PluginStartupInfo*)aInfo); VersionInfo FarVer = {0}; if (InfoW1900->AdvControl(&guid_ConEmuTh, ACTL_GETFARMANAGERVERSION, 0, &FarVer)) { if (FarVer.Major == 3) { gFarVersion.dwBuild = FarVer.Build; _ASSERTE(FarVer.Major<=0xFFFF && FarVer.Minor<=0xFFFF) gFarVersion.dwVerMajor = (WORD)FarVer.Major; gFarVersion.dwVerMinor = (WORD)FarVer.Minor; gFarVersion.Bis = (FarVer.Stage==VS_BIS); } else { _ASSERTE(FarVer.Major == 3); } } //int nLen = lstrlenW(InfoW1900->RootKey)+16; //if (gszRootKey) free(gszRootKey); //gszRootKey = (wchar_t*)calloc(nLen,2); //lstrcpyW(gszRootKey, InfoW1900->RootKey); //WCHAR* pszSlash = gszRootKey+lstrlenW(gszRootKey)-1; //if (*pszSlash != L'\\') *(++pszSlash) = L'\\'; //lstrcpyW(pszSlash+1, L"ConEmuTh\\"); }
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 SetStartupInfoW995(void *aInfo) { INIT_FAR_PSI(::InfoW995, ::FSFW995, (PluginStartupInfo*)aInfo); DWORD nFarVer = 0; if (InfoW995->AdvControl(InfoW995->ModuleNumber, ACTL_GETFARVERSION, &nFarVer)) { if (HIBYTE(LOWORD(nFarVer)) == 2) { gFarVersion.dwBuild = HIWORD(nFarVer); gFarVersion.dwVerMajor = (HIBYTE(LOWORD(nFarVer))); gFarVersion.dwVerMinor = (LOBYTE(LOWORD(nFarVer))); } else { _ASSERTE(HIBYTE(HIWORD(nFarVer)) == 2); } } size_t nLen = lstrlenW(InfoW995->RootKey)+16; //-V303 if (gszRootKeyW995) free(gszRootKeyW995); gszRootKeyW995 = (wchar_t*)calloc(nLen,sizeof(wchar_t)); lstrcpyW(gszRootKeyW995, InfoW995->RootKey); WCHAR* pszSlash = gszRootKeyW995+lstrlenW(gszRootKeyW995)-1; //-V303 if (*pszSlash != L'\\') *(++pszSlash) = L'\\'; lstrcpyW(pszSlash+1, L"ConEmuTh\\"); }
void SetStartupInfoW995(void *aInfo) { INIT_FAR_PSI(::InfoW995, ::FSFW995, (PluginStartupInfo*)aInfo); DWORD nFarVer = 0; if (InfoW995->AdvControl(InfoW995->ModuleNumber, ACTL_GETFARVERSION, &nFarVer)) { if (HIBYTE(LOWORD(nFarVer)) == 2) { gFarVersion.dwBuild = HIWORD(nFarVer); gFarVersion.dwVerMajor = (HIBYTE(LOWORD(nFarVer))); gFarVersion.dwVerMinor = (LOBYTE(LOWORD(nFarVer))); } else { _ASSERTE(HIBYTE(HIWORD(nFarVer)) == 2); } } lstrcpynW(gszRootKey, InfoW995->RootKey, countof(gszRootKey)); WCHAR* pszSlash = gszRootKey+lstrlenW(gszRootKey)-1; if (*pszSlash == L'\\') *(pszSlash--) = 0; while(pszSlash>gszRootKey && *pszSlash!=L'\\') pszSlash--; *pszSlash = 0; }
void SetStartupInfoW1900(void *aInfo) { INIT_FAR_PSI(::InfoW1900, ::FSFW1900, (PluginStartupInfo*)aInfo); //_ASSERTE(FPS_SHOWSTATUSLINE == 0x00000040); //_ASSERTE(FPS_SHOWCOLUMNTITLES == 0x00000020); #ifdef _DEBUG INT_PTR i; wchar_t szPath[MAX_PATH]; lstrcpy(szPath, L"C:\\Windows\\TEMP\\fff.log"); i = FSFW1900->ProcessName(L"*\\TEMP\\*", szPath, 0, PN_CMPNAME); i = FSFW1900->ProcessName(L"TEMP", szPath, 0, PN_CMPNAME); i = FSFW1900->ProcessName(L"*TEMP*", szPath, 0, PN_CMPNAME); lstrcpy(szPath, L"C:\\vc\\.svn\\fff.log"); i = FSFW1900->ProcessName(L"*\\.SVN\\*", szPath, 0, PN_CMPNAME); lstrcpy(szPath, L"C:\\vc\\.svn\\"); i = FSFW1900->ProcessName(L"*\\.SVN\\*", szPath, 0, PN_CMPNAME); #endif VersionInfo FarVer = {0}; if (InfoW1900->AdvControl(&guid_ConEmuBg, ACTL_GETFARMANAGERVERSION, 0, &FarVer)) { if (FarVer.Major == 3) { gFarVersion.dwBuild = FarVer.Build; _ASSERTE(FarVer.Major<=0xFFFF && FarVer.Minor<=0xFFFF) gFarVersion.dwVerMajor = (WORD)FarVer.Major; gFarVersion.dwVerMinor = (WORD)FarVer.Minor; gFarVersion.Bis = (FarVer.Stage==VS_BIS); } else { _ASSERTE(FarVer.Major == 3); } } //int nLen = lstrlenW(InfoW1900->RootKey)+16; //if (gszRootKey) free(gszRootKey); //gszRootKey = (wchar_t*)calloc(nLen,2); //lstrcpyW(gszRootKey, InfoW1900->RootKey); //WCHAR* pszSlash = gszRootKey+lstrlenW(gszRootKey)-1; //if (*pszSlash != L'\\') *(++pszSlash) = L'\\'; //lstrcpyW(pszSlash+1, L"ConEmuTh\\"); }
void CPluginAnsi::SetStartupInfoPtr(void *aInfo) { INIT_FAR_PSI(::InfoA, ::FSFA, (PluginStartupInfo*)aInfo); mb_StartupInfoOk = true; 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))); _ASSERTE(gFarVersion.dwBits == WIN3264TEST(32,64)); } else { _ASSERTE(HIBYTE(HIWORD(nFarVer)) == 1); } } SetRootRegKey(ToUnicode(InfoA->RootKey)); }
void CPluginW2800::SetStartupInfoPtr(void *aInfo) { INIT_FAR_PSI(::InfoW2800, ::FSFW2800, (PluginStartupInfo*)aInfo); mb_StartupInfoOk = true; VersionInfo FarVer = {0}; if (InfoW2800->AdvControl(&guid_ConEmu, ACTL_GETFARMANAGERVERSION, 0, &FarVer)) { if (FarVer.Major == 3) { gFarVersion.dwBuild = FarVer.Build; _ASSERTE(FarVer.Major<=0xFFFF && FarVer.Minor<=0xFFFF); gFarVersion.dwVerMajor = (WORD)FarVer.Major; gFarVersion.dwVerMinor = (WORD)FarVer.Minor; gFarVersion.Bis = (FarVer.Stage==VS_BIS); _ASSERTE(gFarVersion.dwBits == WIN3264TEST(32,64)); } else { _ASSERTE(FarVer.Major == 3); } } }