亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
青青草国产精品97视觉盛宴| 欧美日韩精品一区二区天天拍小说 | 亚洲午夜精品一区二区三区他趣| 日本视频中文字幕一区二区三区| 不卡影院免费观看| 日韩欧美一区二区在线视频| 亚洲日本乱码在线观看| 久久精品国产第一区二区三区| 色综合天天狠狠| 国产三级久久久| 国内精品自线一区二区三区视频| 欧美色网站导航| 一区二区三区中文字幕在线观看| 国产不卡在线一区| 精品国产在天天线2019| 日本亚洲一区二区| 欧美色手机在线观看| 亚洲靠逼com| 99久久精品久久久久久清纯| 中文字幕欧美三区| 国产一区二区三区精品视频| 欧美一区二区免费观在线| 婷婷成人激情在线网| 欧美日韩一区中文字幕| 亚洲成人自拍网| 欧美色视频一区| 香蕉乱码成人久久天堂爱免费| 在线影院国内精品| 一区二区三区91| 在线观看av不卡| 亚洲大片在线观看| 91精品欧美福利在线观看| 亚洲a一区二区| 91麻豆精品国产91| 麻豆精品一区二区| 久久夜色精品国产欧美乱极品| 激情六月婷婷综合| 国产欧美日韩另类视频免费观看| 国产白丝精品91爽爽久久| 国产色综合久久| av在线综合网| 夜夜嗨av一区二区三区网页| 欧美性大战久久久| 日韩av电影免费观看高清完整版在线观看 | 欧美日韩久久久一区| 污片在线观看一区二区| 日韩欧美资源站| 成人福利视频网站| 一区二区三区成人在线视频| 6080午夜不卡| 国产成人自拍高清视频在线免费播放| 国产精品剧情在线亚洲| 91丨porny丨蝌蚪视频| 亚洲成av人综合在线观看| 91精品国产入口| 国产美女在线观看一区| 亚洲人被黑人高潮完整版| 欧美日韩精品欧美日韩精品一| 亚洲香蕉伊在人在线观| 日韩一区和二区| 北条麻妃一区二区三区| 五月天视频一区| 久久精品一区四区| 欧美午夜精品电影| 久久精品国产77777蜜臀| 国产精品无码永久免费888| 欧美视频完全免费看| 国产麻豆成人精品| 一区二区三区.www| 国产亚洲一本大道中文在线| 色一区在线观看| 国产剧情一区二区| 一二三区精品视频| 国产日本欧美一区二区| 欧美精品久久久久久久久老牛影院| 国产精品资源站在线| 午夜免费久久看| 国产精品三级av在线播放| 欧美精品一级二级| 91亚洲精品久久久蜜桃| 国产在线精品免费| 日韩av一区二| 亚洲一卡二卡三卡四卡无卡久久| 久久久欧美精品sm网站| 欧美一区二区成人| 色哦色哦哦色天天综合| 粉嫩av一区二区三区在线播放| 亚洲国产精品一区二区www在线| 亚洲国产成人午夜在线一区| 日韩免费看网站| 欧美日韩成人激情| 一本高清dvd不卡在线观看 | 久久99久久久欧美国产| 亚洲电影视频在线| 亚洲私人黄色宅男| 国产片一区二区| 精品福利一区二区三区免费视频| 欧美少妇性性性| 91国模大尺度私拍在线视频| 国产激情91久久精品导航| 久久99精品久久只有精品| 日韩福利电影在线观看| 亚洲国产综合91精品麻豆| 亚洲欧美日韩一区| 亚洲人成人一区二区在线观看| 欧美激情在线一区二区三区| 精品免费日韩av| 日韩欧美一区电影| 日韩欧美一区中文| 精品国偷自产国产一区| 日韩美女天天操| 欧美剧情片在线观看| 欧美色图激情小说| 欧美精品一级二级三级| 制服丝袜亚洲色图| 欧美一区二区三区播放老司机| 7878成人国产在线观看| 日韩欧美在线影院| 久久男人中文字幕资源站| 欧美精品一区二区久久婷婷 | 日韩一区二区在线观看视频播放| 91精品一区二区三区久久久久久 | 国产日韩欧美精品电影三级在线| 国产亚洲自拍一区| 国产精品美女久久久久av爽李琼| 国产精品久久久久久久久果冻传媒| 欧美国产一区二区| 亚洲欧美激情小说另类| 亚洲成a天堂v人片| 精品一区二区日韩| 丁香六月综合激情| 在线看一区二区| 91麻豆精品国产自产在线| 日韩亚洲欧美高清| 国产精品系列在线| 亚洲成人综合网站| 国产乱码一区二区三区| 91福利国产精品| 777a∨成人精品桃花网| 久久婷婷综合激情| 亚洲久草在线视频| 久久精品99国产精品| 成人午夜激情视频| 欧美美女激情18p| 久久九九国产精品| 亚洲第一电影网| 国产传媒日韩欧美成人| 色狠狠色噜噜噜综合网| 欧美videos中文字幕| 国产精品久久久久永久免费观看| 亚洲精品中文在线观看| 久久99精品久久久久久久久久久久| 不卡电影一区二区三区| 91精品婷婷国产综合久久性色| 欧美激情综合五月色丁香| 亚洲成人动漫在线观看| 国产东北露脸精品视频| 欧美色综合影院| 日本一区二区在线不卡| 日韩av一区二区在线影视| av不卡在线播放| 欧美大片一区二区三区| 一区二区三区四区在线| 国产一区二区导航在线播放| 欧美日韩中文另类| 中文字幕佐山爱一区二区免费| 免播放器亚洲一区| 在线免费观看日本一区| 国产精品美女久久久久久2018| 美女一区二区久久| 欧美性感一区二区三区| 国产精品久久久久一区二区三区 | 精品粉嫩超白一线天av| 一区二区三区精品在线观看| 国产成人亚洲综合a∨婷婷图片| 7878成人国产在线观看| 亚洲一区日韩精品中文字幕| 成人av午夜影院| 久久女同性恋中文字幕| 捆绑变态av一区二区三区| 欧洲色大大久久| 依依成人综合视频| 91在线观看成人| 国产精品欧美极品| jizz一区二区| 中文字幕 久热精品 视频在线| 另类专区欧美蜜桃臀第一页| 欧美久久婷婷综合色| 亚洲综合激情网| 色婷婷综合久久久久中文| 亚洲欧美日韩国产成人精品影院| 成人一区二区三区在线观看| 久久综合久久鬼色| 国产精品资源在线看| 久久看人人爽人人| 大胆亚洲人体视频| 欧美激情一区二区三区在线| 国产suv精品一区二区883| 国产视频一区二区在线观看| 高清不卡在线观看|