亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jelreginstaller.cpp

?? 用java 編寫的源碼開放的文本編輯器。有很多有用的特性
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/* * JELRegInstaller.cpp - part of jEditLauncher package * Copyright (C) 2001 John Gellene * jgellene@nyc.rr.com * * Notwithstanding the terms of the General Public License, the author grants * permission to compile and link object code generated by the compilation of * this program with object code and libraries that are not subject to the * GNU General Public License, provided that the executable output of such * compilation shall be distributed with source code on substantially the * same basis as the jEditLauncher package of which this program is a part. * By way of example, a distribution would satisfy this condition if it * included a working makefile for any freely available make utility that * runs on the Windows family of operating systems. This condition does not * require a licensee of this software to distribute any proprietary software * (including header files and libraries) that is licensed under terms * prohibiting redistribution to third parties. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * * $Id: JELRegInstaller.cpp,v 1.14 2002/02/19 03:33:44 jgellene Exp $ */#include "stdafx.h"#include <string.h>#include "InstallData.h"#include "StringPtr.h"#include "InstallerLog.h"#include "JELRegInstaller.h"#include <assert.h>#include <stdlib.h> // for itoa in debug/* Implementation of JELRegistryInstaller */JELRegistryInstaller::JELRegistryInstaller(const InstallData *ptrData,										   Installer *ptrOwner)	: pData(ptrData), pOwner(ptrOwner) {}JELRegistryInstaller::~JELRegistryInstaller() {}HRESULT JELRegistryInstaller::Install(){	InstallerLog::Log(Message, "Commencing installation of registry entires. . . .\n");	HRESULT hr;	// register proxy/stub DLL	CString strPath(pData->strInstallDir);	strPath += _T("\\jeservps.dll");	if(FAILED(hr = RegisterDLL(strPath, TRUE)))		return hr;	// registration of unlaunch for "Add/Remove Programs" applet	// other data added by COM server	RegisterUninstall();	// register COM server	strPath = pData->strInstallDir;	strPath += _T("\\jeditsrv.exe");	if(FAILED(hr = RegisterEXE(strPath)))	{		// TODO: try to restore former setting		return hr;	}	// register the context menu handler	strPath = pData->strInstallDir;	strPath += pData->bUsingTempFileName ?		_T("\\jeshlstb.dl_") : _T("\\jeshlstb.dll");	if(FAILED(hr = RegisterDLL(strPath, TRUE)))		return hr;	// if we are still using the temporary file name, fix the	// registration entry so it will be correct after rebooting	if(pData->bUsingTempFileName)	{		if(FAILED(hr = CorrectTempCtxReg()))		{			InstallerLog::Log(Debug,				"Registration of context menu handler could not be corrected.\n");			return hr;		}	}	RegisterPrimaryVersion();	RegisterCmdLineParameters();	return hr;}HRESULT JELRegistryInstaller::RegisterDLL(LPCTSTR szPath, BOOL bRegister){	if(bRegister)	{		InstallerLog::Log(Message, "Registering %s. . .\n", szPath);	}	FARPROC proc = 0;	HRESULT hr;	LPCTSTR szProc = bRegister ? _T("DllRegisterServer") :		_T("DllUnregisterServer");	HMODULE hModule = ::LoadLibrary(szPath);	if(hModule == 0)	{		InstallerLog::Log(Error, "Could not load library in %s\n.",			szPath);		return E_FAIL;	}	proc = GetProcAddress(hModule, szProc);	if(proc == 0)	{		InstallerLog::Log(Error, "Could not get address for %s in %s\n.",			szProc, szPath);		hr = E_FAIL;	}	else	{		hr = (proc)();		if(hr != S_OK)		{			if(bRegister)			{				InstallerLog::Log(Error, "Registration failed; error code 0x%08x.\n");			}			hr = E_FAIL;		}		else		{			InstallerLog::Log(Message, "Registration succeeded.\n");		}	}	if(hModule != 0)		FreeLibrary(hModule);	return hr;}HRESULT JELRegistryInstaller::RegisterEXE(LPCTSTR szPath, BOOL bRegister){	if(bRegister)	{		InstallerLog::Log(Message, "Registering %s. . .\n", szPath);	}	CString strCmdLine(szPath);	strCmdLine += (bRegister ? _T(" /RegServer") : _T(" /UnregServer"));	CStringBuf<> bufCmdLine(strCmdLine);	STARTUPINFO si;	::ZeroMemory(&si, sizeof(si));	PROCESS_INFORMATION pi;	BOOL bReturn =  CreateProcess(0, bufCmdLine, 0, 0, 0, 0, 0, 0, &si, &pi);	if(!bReturn)	{		if(bRegister)			InstallerLog::Log(Error, "Registration failed.\n");		DWORD swError = GetLastError();	}	else	{		if(bRegister)			InstallerLog::Log(Message, "Registration succeeded.\n");	}	return bReturn ? S_OK : E_FAIL;}HRESULT JELRegistryInstaller::CorrectTempCtxReg(){	HKEY hKey = 0;	CString strClassKeyPath((LPCSTR)IDS_REG_CTX_SERVER_KEY);	int nResult = RegOpenKeyEx(HKEY_CLASSES_ROOT,		strClassKeyPath, 0, KEY_SET_VALUE, &hKey);	if(nResult == ERROR_SUCCESS)	{		nResult = RegSetValueEx(hKey, 0, 0, REG_SZ,			(const LPBYTE)(LPCTSTR)pData->strInstallFinalPath,			InstallData::GetBufferByteLen(pData->strInstallFinalPath));	}	RegCloseKey(hKey);	return nResult == ERROR_SUCCESS ? S_OK : E_FAIL;}HRESULT JELRegistryInstaller::RegisterUninstall(){	InstallerLog::Log(Message, "Registering uninstall data for Add/Remove programs...\n");	HKEY hKey;	CString strUninstallKey((LPCSTR)IDS_REG_UNINSTALL_KEY);	strUninstallKey += pData->strInstallVersion;	::OutputDebugString(strUninstallKey);	int nResult = RegCreateKeyEx(HKEY_CURRENT_USER,		strUninstallKey, 0, 0, REG_OPTION_NON_VOLATILE,		KEY_WRITE, 0, &hKey, 0);	if(nResult == ERROR_SUCCESS)	{		InstallerLog::Log(Debug, "Found uninstall key\n");		CString strUninstall(pData->strInstallDir);		strUninstall += "\\unlaunch.exe";		nResult = RegSetValueEx(hKey, "UninstallString", 0, REG_SZ,			(const LPBYTE)(LPCTSTR)strUninstall,			InstallData::GetBufferByteLen(strUninstall));		InstallerLog::Log(Debug, "UninstallString %s.\n",			nResult == ERROR_SUCCESS ? "OK" : "error");		CString strInstall(pData->strInstallDir);		strInstall += "\\jedit.exe /i ";		strInstall += pData->strJavaHome;		nResult = RegSetValueEx(hKey, "InstallPath", 0, REG_SZ,			(const LPBYTE)(LPCTSTR)strInstall,			InstallData::GetBufferByteLen(strInstall));		InstallerLog::Log(Debug, "Install Path %s.\n",			nResult == ERROR_SUCCESS ? "OK" : "error");		CString strDisplayIcon(pData->strInstallDir);		strDisplayIcon += "\\jedit.exe, 0";		nResult = RegSetValueEx(hKey, "DisplayIcon", 0, REG_SZ,			(const LPBYTE)(LPCTSTR)strDisplayIcon,			InstallData::GetBufferByteLen(strDisplayIcon));		InstallerLog::Log(Debug, "Display Icon %s.\n",			nResult == ERROR_SUCCESS ? "OK" : "error");	}	else		InstallerLog::Log(Error, "Could not find uninstall registry key.\n");	RegCloseKey(hKey);	InstallerLog::Log(Message, "Uninstall registration %s.\n",		nResult == ERROR_SUCCESS ? "succeeded" : "failed");	return (nResult == ERROR_SUCCESS ? S_OK : E_FAIL);}HRESULT JELRegistryInstaller::RegisterPrimaryVersion(){	// register scripting object and designated context menu handler	// get default value for GUID	// get ProgID under GUID	// default value becomes default value for class 'JEdit.JEditLauncher'	// CLSID is GUID	// CurVer is ProgID	CString strClassKey(_T("CLSID\\"));	const CString& strGUID = pData->strInstallGUID;	strClassKey += strGUID;	CString strClassName;	CString strCurVer;	CString strCurVerDir;	HKEY hKey;	int nResult;	int nCounter = 20;	// waiting for possible registration of new server in separate thread	do	{		Sleep(50);		nResult = RegOpenKeyEx(HKEY_CLASSES_ROOT, strClassKey, 0,			KEY_READ | KEY_QUERY_VALUE, &hKey);	} while(nResult != ERROR_SUCCESS && --nCounter != 0);	if(nResult == ERROR_SUCCESS)	{		CStringBuf<>pClassBuf(strClassName);		DWORD dwLength = pClassBuf.Size();		RegQueryValueEx(hKey, 0, 0, 0, (LPBYTE)pClassBuf, &dwLength);		HKEY hSubkey;		nResult = RegOpenKeyEx(hKey, _T("ProgID"), 0, KEY_READ, &hSubkey);		if(nResult == ERROR_SUCCESS)		{			CStringBuf<>pCurVerBuf(strCurVer);			dwLength = pCurVerBuf.Size();			RegQueryValueEx(hSubkey, 0, 0, 0, (LPBYTE)pCurVerBuf, &dwLength);		}		RegCloseKey(hSubkey);		nResult = RegOpenKeyEx(hKey, _T("LocalServer32"), 0, KEY_READ, &hSubkey);		if(nResult == ERROR_SUCCESS)		{			CStringBuf<>pCurVerDirBuf(strCurVerDir);			dwLength = pCurVerDirBuf.Size();			RegQueryValueEx(hSubkey, 0, 0, 0, (LPBYTE)pCurVerDirBuf, &dwLength);			InstallData::ShortenToDirectory(pCurVerDirBuf);		}		RegCloseKey(hSubkey);	}	RegCloseKey(hKey);	nResult = RegCreateKeyEx(HKEY_CLASSES_ROOT, _T("JEdit.JEditLauncher"), 0, 0, 0,		KEY_ALL_ACCESS, 0, &hKey, 0);	if(nResult == ERROR_SUCCESS)	{		RegSetValueEx(hKey, 0, 0, REG_SZ, (LPBYTE)(LPCTSTR)strClassName,			InstallData::GetBufferByteLen(strClassName));		HKEY hSubkey;		nResult = RegCreateKeyEx(hKey, _T("CLSID"), 0, 0, 0, KEY_ALL_ACCESS,			0, &hSubkey, 0);		if(nResult == ERROR_SUCCESS)		{			RegSetValueEx(hSubkey, 0, 0, REG_SZ, (LPBYTE)(LPCTSTR)strGUID,				InstallData::GetBufferByteLen(strGUID));		}		RegCloseKey(hSubkey);		nResult = RegCreateKeyEx(hKey, _T("CurVer"), 0, 0, 0, KEY_ALL_ACCESS,			0, &hSubkey, 0);		if(nResult == ERROR_SUCCESS)		{			RegSetValueEx(hSubkey, 0, 0, REG_SZ, (LPBYTE)(LPCTSTR)strCurVer,				InstallData::GetBufferByteLen(strCurVer));		}		RegCloseKey(hSubkey);	}	RegCloseKey(hKey);	// unregister uninstall information for jEdit 3.2	int nResultDel = RegOpenKeyEx(HKEY_CURRENT_USER,		_T("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"),		0, KEY_WRITE, &hKey);	if(nResultDel == ERROR_SUCCESS)		RegDeleteKey(hKey, _T("jEdit 3.2"));	RegCloseKey(hKey);	if(nResult != ERROR_SUCCESS)		return E_FAIL;	return S_OK;}HRESULT JELRegistryInstaller::RegisterCmdLineParameters(){	bool bResult = true;	InstallerLog::Log(Message, "Registering command line parameters. . . .\n");	HKEY hLauncherKey, hVersionKey;	DWORD dwDisp;	int nResult;	DWORD dwValueSize;	TCHAR szBuf[MAX_PATH];	TCHAR* arszValues[] = { _T("Java Executable"),							_T("Java Options"),							_T("jEdit Target"),							_T("jEdit Options"),							_T("jEdit Working Directory"),							_T("Launcher GUID"),							_T("Installation Directory"),							_T("Launcher Log Level") };	ZeroMemory(szBuf, MAX_PATH);/*	enum { JavaExec, JavaOptions, jEditTarget, jEditOptions,			Server, WorkingDir, GUID, InstallDir };*/	// ask if parameters should be retained from last installation	bool bUseOldParameters = false;	if((pData->bIs32 || pData->bIs40)	&& IDYES == MessageBox(0,			"Do you wish to retain command line parameters from your existing installation of jEditLauncher?",			"jEditLauncher", MB_ICONQUESTION | MB_YESNO))	{		InstallerLog::Log(Message, "Using parameters from existing installation.\n");		bUseOldParameters = true;	}	else	{		InstallerLog::Log(Message, "Writing default parameters.\n");	}	CString strLauncherParamKeyPath((LPCSTR)IDS_REG_LAUNCHER_PARAM_KEY);	RegCreateKeyEx(HKEY_CURRENT_USER, strLauncherParamKeyPath, 0, 0, 0,			KEY_ALL_ACCESS, 0, &hLauncherKey, 0);	CString strVersion(pData->strInstallVersion);	RegCreateKeyEx(hLauncherKey, strVersion, 0, 0, 0,		KEY_ALL_ACCESS, 0, &hVersionKey, &dwDisp);	// rewrite key from 3.2 to 4.0	if(bUseOldParameters && pData->bIs32 && !pData->bIs40)	{		HKEY hKey32;		int nResult32 = RegOpenKeyEx(hLauncherKey,			"3.2", 0, KEY_READ, &hKey32);		if(nResult32 == ERROR_SUCCESS)		{			nResult32 = RegCopyKey(hKey32, hLauncherKey, "4.0");			RegCloseKey(hKey32);			if(nResult32 == ERROR_SUCCESS)			{				InstallerLog::Log(Debug,					"Copied key information from version 3.2 to 4.0.\n");				nResult32 = RegDeleteKey(hLauncherKey, _T("3.2"));				InstallerLog::Log(Debug, "version 3.2 parameters %s\n",					nResult32 == ERROR_SUCCESS ? "deleted" : "not deleted");			}			else			{				bUseOldParameters = false;				InstallerLog::Log(Error,					"Could not copy parameters from version 3.2 to 4.0, new parameters must be supplied.\n");			}		}		else		{			RegCloseKey(hKey32);			bUseOldParameters = false;			InstallerLog::Log(Error,				"Could not find parameters from version 3.2 to copy, new parameters must be supplied.\n");		}	}	// "Java Executable" - set if old parameter or if not available;	// do not update if user elects to retain old parameters	dwValueSize = MAX_PATH;	nResult = RegQueryValueEx(hVersionKey, arszValues[0], 0, 0, (LPBYTE)szBuf, &dwValueSize);	if(!bUseOldParameters || nResult != ERROR_SUCCESS || dwValueSize == 0)	{		CString strJavaExec(pData->strJavaHome);		strJavaExec += _T("\\javaw.exe");		nResult = RegSetValueEx(hVersionKey, arszValues[0], 0,			REG_SZ, (LPBYTE)(LPCTSTR)strJavaExec,			InstallData::GetBufferByteLen(strJavaExec));		if(ERROR_SUCCESS == nResult)		{			InstallerLog::Log(Debug,				"Writing \"Java Executable\" registry parameter: %s\n",				(LPCSTR)strJavaExec);		}		else		{			InstallerLog::Log(Error,				"Could not write \"Java Executable\" registry parameter.\n");			bResult &= false;		}	}	// "Java Options" - set if new parameters of if unavailable;	// update regardless whenther user elects to retain old parameters	dwValueSize = MAX_PATH;	nResult = RegQueryValueEx(hVersionKey, arszValues[1], 0, 0, (LPBYTE)szBuf, &dwValueSize);	if(!bUseOldParameters || nResult != ERROR_SUCCESS || dwValueSize == 0)	{		bUseOldParameters = false;		CString strJavaOptions(_T("-mx32m -jar"));//		strJavaOptions.Format(IDS_REG_JAVAPARAM_DEFAULT,//			pData->arPathNames[pData->nIndexSubjectVer]);		nResult = RegSetValueEx(hVersionKey, arszValues[1], 0,			REG_SZ, (LPBYTE)(LPCTSTR)strJavaOptions,			InstallData::GetBufferByteLen(strJavaOptions));		if(ERROR_SUCCESS == nResult)		{			InstallerLog::Log(Debug,				"Writing \"Java Options\" registry parameter: %s\n",				(LPCSTR)strJavaOptions);		}		else		{			InstallerLog::Log(Error,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩av电影免费观看高清完整版| 91蜜桃传媒精品久久久一区二区| 91网站最新网址| 91精品国产全国免费观看| 国产夜色精品一区二区av| 亚洲线精品一区二区三区八戒| 国模冰冰炮一区二区| 欧美亚洲国产一区二区三区va| 久久综合九色综合97婷婷| 亚洲1区2区3区视频| 99r国产精品| 国产欧美日韩久久| 青草国产精品久久久久久| 91免费观看视频| 2024国产精品| 久久精品国产一区二区| 欧美日韩另类国产亚洲欧美一级| 国产精品久久久久久久岛一牛影视| 精品一区二区三区影院在线午夜| 欧美日韩在线电影| 一区二区三区久久久| 欧美日韩久久久一区| 自拍偷拍欧美精品| 成人精品一区二区三区中文字幕| 精品国产凹凸成av人网站| 丝袜诱惑制服诱惑色一区在线观看| 一本大道综合伊人精品热热| 国产精品午夜在线观看| 精品亚洲成a人| 精品成人a区在线观看| 九九国产精品视频| 日韩欧美成人激情| 奇米影视一区二区三区小说| 91精品国产综合久久久久| 亚洲午夜久久久久久久久电影网| 欧美在线一二三四区| 亚洲成av人片一区二区梦乃 | 欧美精品在线观看一区二区| 亚洲黄色小说网站| 在线观看日韩一区| 午夜电影网一区| 制服丝袜国产精品| 久久精品国产精品亚洲精品| 久久久久久久免费视频了| 国产精品一区三区| 国产精品久久777777| 国产成人免费在线视频| 国产精品久久毛片av大全日韩| av亚洲精华国产精华精| 久久精品99久久久| www国产精品av| 国产v综合v亚洲欧| 亚洲人妖av一区二区| 欧美日韩国产高清一区二区三区 | 精彩视频一区二区三区| 久久久久久久久久久黄色| 成人免费va视频| 亚洲国产成人va在线观看天堂| 91精品国产综合久久精品麻豆| 久草中文综合在线| 国产精品毛片大码女人| 欧美亚洲一区二区三区四区| 无吗不卡中文字幕| 久久午夜羞羞影院免费观看| 99精品国产99久久久久久白柏| 亚洲图片欧美视频| 日韩视频一区在线观看| 波多野结衣精品在线| 日韩精品国产欧美| 中文字幕中文字幕在线一区| 日韩一区二区三区视频在线 | 精品一区二区三区在线观看国产| 国产精品久久久久影院| 9191国产精品| 99视频精品在线| 久久69国产一区二区蜜臀| 综合色天天鬼久久鬼色| 欧美va天堂va视频va在线| 91浏览器在线视频| 国产精品自拍在线| 天堂av在线一区| 国产精品国产馆在线真实露脸| 91 com成人网| 色天天综合色天天久久| 国产麻豆成人精品| 亚洲大片在线观看| 国产精品美女一区二区在线观看| 欧美日韩mp4| 色综合天天做天天爱| 国产精品一二三四五| 日韩电影在线观看电影| 亚洲一区二区三区在线| 国产精品传媒入口麻豆| 久久综合av免费| 日韩免费一区二区三区在线播放| 欧美色图12p| 色噜噜狠狠成人网p站| 成人黄色软件下载| 国产成人自拍高清视频在线免费播放| 日本在线观看不卡视频| 亚洲国产精品人人做人人爽| 中文字幕日韩一区| 国产精品色在线观看| 国产色产综合色产在线视频| 亚洲精品在线三区| 日韩免费观看2025年上映的电影 | 免费久久99精品国产| 亚洲国产精品久久不卡毛片| |精品福利一区二区三区| 欧美国产日韩在线观看| 久久午夜羞羞影院免费观看| www欧美成人18+| 久久久综合视频| 久久久亚洲午夜电影| 国产午夜亚洲精品午夜鲁丝片| 久久综合九色欧美综合狠狠| 久久久久成人黄色影片| 亚洲午夜日本在线观看| 亚洲综合小说图片| 亚洲午夜久久久| 日本不卡的三区四区五区| 视频一区在线播放| 美女视频网站久久| 国产伦精品一区二区三区免费| 国产在线一区二区综合免费视频| 激情偷乱视频一区二区三区| 国产精品综合一区二区| 成人午夜短视频| 一本久久a久久精品亚洲| 色婷婷综合久久久中文字幕| 欧美日韩一级视频| 欧美第一区第二区| 欧美国产日韩亚洲一区| 亚洲欧美一区二区三区国产精品 | 国产精品久久久久久久久久免费看| 欧美高清在线一区二区| 亚洲精品日日夜夜| 日韩中文字幕91| 狠狠色丁香婷综合久久| 成人精品国产福利| 色欧美片视频在线观看在线视频| 欧美午夜精品一区| 日韩三级av在线播放| 国产日韩欧美综合在线| 曰韩精品一区二区| 精品亚洲国产成人av制服丝袜| 成人午夜激情在线| 欧美精品v日韩精品v韩国精品v| 精品国产一区二区三区四区四| 中国色在线观看另类| 日韩精品乱码免费| 成人免费看片app下载| 欧美日韩三级视频| 国产午夜精品久久| 午夜视频久久久久久| 福利电影一区二区| 69堂国产成人免费视频| 国产精品国产精品国产专区不蜜 | 亚洲蜜臀av乱码久久精品| 日本美女一区二区| 91丨porny丨首页| 欧美哺乳videos| 亚洲永久精品大片| 国产成人精品免费视频网站| 欧美三级电影网站| 中文字幕第一区第二区| 日本va欧美va瓶| 一本大道久久a久久精二百| 久久这里只精品最新地址| 亚洲电影欧美电影有声小说| 99久久国产免费看| 国产亚洲精品超碰| 美腿丝袜一区二区三区| 91福利在线观看| 国产精品不卡在线观看| 国产一区二区0| 欧美一区二区久久久| 亚洲国产综合人成综合网站| 成人激情视频网站| 久久精品一区二区三区不卡| 男人操女人的视频在线观看欧美| 色综合久久中文综合久久97| 日本一区二区综合亚洲| 狠狠色狠狠色合久久伊人| 91麻豆精品国产91| 亚洲成人免费av| 欧美偷拍一区二区| 依依成人综合视频| 色哟哟国产精品免费观看| 国产精品美女一区二区三区| 国产999精品久久| 精品成人一区二区| 国产一区二区日韩精品| 精品国产亚洲在线| 91亚洲国产成人精品一区二区三| 久久久国产精品午夜一区ai换脸| 麻豆精品视频在线观看视频| 日韩欧美卡一卡二| 久久精品国产99久久6| 精品久久久久久最新网址|