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

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

?? jeditinit.cpp

?? 用java 編寫的源碼開放的文本編輯器。有很多有用的特性
?? CPP
字號:
/* * jeditinit.cpp - part of jEditLauncher package * Copyright (C) 2001, 2002 John Gellene * jgellene@nyc.rr.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or any later version. * * 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: jeditinit.cpp,v 1.14 2002/03/24 21:09:00 jgellene Exp $ */// jeditinit.cpp : Defines the entry point for the application.//#include "stdafx.h"#include "jeditinitDlg.h"#include "..\jeditlauncher\jeditlauncher_i.c"#include "..\jeditlauncher\jeditlauncher.h"#include "..\ltslog\ltslog.h"  // logging module// NOTE: status codes for installation status#define NOT_RUN				0#define INSTALL_ERROR		-1#define INSTALL_OK			1#define INSTALL_REBOOT		2// NOTE: function declarationsvoid ErrorMessage(LPCTSTR szMessage);bool IsInstalled();bool TryInstall();int Install(const char* szJavaHome);bool GetJavaDir(char *lpszDir);int Unregister();int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);void CloseLog();TCHAR *szApp = _T("jEdit 4.0");TCHAR *szVersion = _T("Software\\www.jedit.org\\jEditLauncher\\4.0");TCHAR *szCOMClassName = _T("JEdit.JEditLauncher.4.0");// NOTE: end version-specific// NOTE: logging module parametersHMODULE hLogModule;LogFunc logProc;CLtslog* pLog;// NOTE: dummy mapBEGIN_OBJECT_MAP(ObjectMap)END_OBJECT_MAP()CComModule _Module;int APIENTRY WinMain(HINSTANCE hInstance,                     HINSTANCE hPrevInstance,                     LPSTR     lpCmdLine,                     int       nCmdShow){	/*	 * 	NOTE:  __argc and __argv contain parsed command line 	 */	HRESULT hrCOM = CoInitialize(0);	if(FAILED(hrCOM))   	{	   ErrorMessage(_T("Application failure: could not initialize COM facilities."));	   return 1;	}	// NOTE: initialize ATL 	_Module.Init(NULL, GetModuleHandle(NULL));    // NOTE: this code uses common controls, so we need to initialize them	InitCommonControls();	// NOTE: initialize logging module	pLog = 0;	logProc = 0;	hLogModule = LoadLibrary("ltslog.dll");	if(hLogModule != 0)	{		LogOpenFunc openProc =			(LogOpenFunc)GetProcAddress(hLogModule, "OpenLog");		logProc = (LogFunc)GetProcAddress(hLogModule, "Log");		if(openProc != 0 && logProc != 0)		{			pLog = (openProc)("jelaunch.log", Debug);		}	}	if(logProc)	{		(logProc)(pLog, true, Message, "[jedit.exe] Calling jedit.exe module.\n");		char **ppToken = __argv;		while(*ppToken != 0)		{			(logProc)(pLog, true, Debug,				"[jedit.exe] full command line token: %s\n", *ppToken);			++ppToken;		}	}	// NOTE: check for existing installation	bool bInstalled = IsInstalled();	int nReturnCode = -1;	bool bShowUsage = true;	bool bSingleFile = false;	// NOTE: command line parsing	++ __argv;	-- __argc;	// NOTE: install option takes precedence	if(__argc != 0 && __argc < 3 && lstrcmp(*__argv, _T("/i")) == 0)	{		char *szParam = (__argc == 2 ? *(__argv + 1) : 0);		bInstalled = Install(szParam) ? true : false;		bShowUsage = false;		nReturnCode = !bInstalled;	}	else if(__argc == 1 && **__argv == _T('/'))	{		if(lstrlen(*__argv) > 2)			nReturnCode = 1;		else if(*(*__argv + 1) == _T('h'))			nReturnCode = 0;		else if(*(*__argv + 1) == _T('p'))		{			bShowUsage = false;			if(bInstalled || TryInstall())			{				CJeditinitDlg dlg;				dlg.DoModal();				nReturnCode = 0;			}			else			{				nReturnCode = 1;			}		}		else if(*(*__argv + 1) == _T('u'))		{			bShowUsage = false;			Unregister();			nReturnCode = 0;		}		else if(*(*__argv + 1) == _T('1'))		{			nReturnCode = 1;		}	}	else if(__argc > 1 && **__argv == _T('/')		&& *(*__argv + 1) == _T('1'))	{		bSingleFile = true;		if(logProc)		{			(logProc)(pLog, true, Debug,				"[jexit.exe] Calling launcher in single file mode.\n");		}	}	else if(!bInstalled && !TryInstall())	{		bShowUsage = false;		nReturnCode = 1;	}	if(nReturnCode != -1)	{		if(bShowUsage)		{			CSimpleDialog<IDD_ABOUTBOX, TRUE> dlg;			dlg.DoModal();		}		if(S_OK == hrCOM)			CoUninitialize();        _Module.Term();		CloseLog();		return nReturnCode;	}	// NOTE: implicit else:  argc either 0 or number of files	// NOTE: in filelist; invoke jEditLauncher	IJEditLauncher *piJEdit = 0;	HRESULT hr = CoCreateInstance(CLSID_JEditLauncher40, 0 , CLSCTX_LOCAL_SERVER,		IID_IJEditLauncher, (void**)&piJEdit);	if(hr != S_OK)	{		ErrorMessage(_T("Could not create JEditLauncher object"));	}	else	{		BOOL bSuccess = FALSE;		CHAR fullPath[MAX_PATH];		CHAR *pFileName;		BSTR bstrFile = 0;		WCHAR wszFile[MAX_PATH];		wszFile[0] = 0;		UINT nCodePage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;		if(__argc == 0)		{			hr = piJEdit->Launch();		}		// NOTE: get single path name from command line		else if(bSingleFile)		{			LPTSTR pCmdLine = GetCommandLine();			if(logProc)			{				(logProc)(pLog, true, Debug,					"[jexit.exe] Command line is %s\n", pCmdLine);			}			bool bSlash = false;			bool bFound = false;			for(TCHAR *p = pCmdLine; *p != 0; p = CharNext(p))			{				if(bFound)				{					if(!_istspace(*p))						 break;				}				else				{					if(*p == _T('1'))					{						if(bSlash)						{							bFound = true;							continue;						}					}					bSlash = (*p == _T('/'));				}			}			if(*p != 0)			{				GetFullPathName(p, MAX_PATH, fullPath, &pFileName);				bSuccess = MultiByteToWideChar(nCodePage, 0, fullPath, -1,						wszFile, MAX_PATH);				if(logProc)				{					(logProc)(pLog, true, Debug,						"[jexit.exe] Calling launcher module on %S.\n", wszFile);				}				bstrFile = SysAllocString(wszFile);				hr = piJEdit->OpenFile(bstrFile);				SysFreeString(bstrFile);			}			else if(logProc)			{				(logProc)(pLog, true, Debug,					"[jedit.exe] Could not find single file mode parameter.\n");			}		}		// NOTE: make a variant array to allow for marshalling of		// NOTE: file name parameters across process boundaries		else		{			SAFEARRAY *psa = 0;			SAFEARRAYBOUND rgsabound[1];			rgsabound[0].lLbound = 0;			rgsabound[0].cElements = __argc;			psa = SafeArrayCreate(VT_VARIANT, 1, rgsabound);			if(logProc)				(logProc)(pLog, true, Debug,					"[jedit.exe] Code page for file I/O is %s default.\n",					nCodePage == CP_ACP ? "ANSI" : "OEM");			BOOL bSuccess;			// NOTE: if we can't create the array, grab the first file only			if( psa == 0)			{				GetFullPathName(*__argv, MAX_PATH, fullPath, &pFileName);				bSuccess = MultiByteToWideChar(nCodePage, 0, fullPath, -1,						wszFile, MAX_PATH);				if(logProc)				{					(logProc)(pLog, true, Debug,						"[jexit.exe] Calling launcher module on %S.\n", wszFile);				}				bstrFile = SysAllocString(wszFile);				hr = piJEdit->OpenFile(bstrFile);				SysFreeString(bstrFile);			}			else			{				long ix[1];				long& i = *ix;				VARIANT var;				VariantInit(&var);				for(i = 0L; i < (long)__argc; ++i)				{					GetFullPathName(*__argv++, MAX_PATH, fullPath, &pFileName);					bSuccess = MultiByteToWideChar(nCodePage, 0, fullPath, -1,						wszFile, MAX_PATH);					bstrFile = ::SysAllocString(wszFile);					var.vt = VT_BSTR;					var.bstrVal = bstrFile;					SafeArrayPutElement(psa, ix, (void*)&var);					VariantClear(&var);					SysFreeString(bstrFile);				}				if(logProc)				{					(logProc)(pLog, true, Debug,						"[jedit.exe] Calling launcher module.\n");				}				var.vt = (VT_ARRAY | VT_VARIANT);				var.parray = psa;				hr = piJEdit->OpenFiles(var);				VariantClear(&var);			}		}		if(hr != S_OK)		{			CString strError;			IErrorInfo *pErr = 0;			hr = GetErrorInfo(0L, &pErr);			if(hr != S_OK)			{				strError.Format("Unknown error %s",					__argc != 0 ? "opening files" : "launching jEdit");			}			else			{				BSTR bstrSource, bstrDescription;				pErr->GetSource(&bstrSource);				pErr->GetDescription(&bstrDescription);				pErr->Release();				CHAR pszSource[32];				CHAR pszDescription[255];				WideCharToMultiByte(CP_ACP, 0, bstrSource, -1,					pszSource, 32, 0, 0);				WideCharToMultiByte(CP_ACP, 0, bstrDescription, -1,					pszDescription, 255, 0, 0);				::SysFreeString(bstrSource);				::SysFreeString(bstrDescription);				strError.Format("Error %s\n%s - %s\n",					__argc != 0 ? "opening files:" : "launching jEdit:",					pszSource, pszDescription);			}			ErrorMessage(strError);		}		piJEdit->Release();	}    if(S_OK == hrCOM)		CoUninitialize();	_Module.Term();	CloseLog();	return hr;}void ErrorMessage(LPCTSTR szMessage){	::MessageBox(0, szMessage, szApp, MB_ICONERROR);	if(logProc)		(logProc)(pLog, true, Error, "[jedit.exe] %s\n", szMessage);}typedef int(*InstallFunc)(LPCSTR);typedef int(*UninstallFunc)();int Install(const char* szJavaHome){	HMODULE hModule = LoadLibrary("jedinstl.dll");	if(hModule == 0)		return INSTALL_ERROR;	InstallFunc func = (InstallFunc)GetProcAddress(hModule, "Install");	if(func == 0)		return INSTALL_ERROR;	if(szJavaHome == 0 || *szJavaHome == 0)	{		char szJavaDir[MAX_PATH];		if(!GetJavaDir(szJavaDir))			return INSTALL_ERROR;		szJavaHome = szJavaDir;	}	if(logProc)		(logProc)(pLog, true, Message,			"[jedit.exe] Calling installation module.\n");	int nReturnValue = (func)(szJavaHome);	if(logProc)		(logProc)(pLog, true, Message,			"[jedit.exe] Installation module returns %d.\n",			nReturnValue);	FreeLibrary(hModule);	return nReturnValue;}int Unregister(){	HMODULE hModule = LoadLibrary("jedinstl.dll");	if(hModule == 0)		return INSTALL_ERROR;	UninstallFunc func = (UninstallFunc)GetProcAddress(hModule, "Unregister");	if(func == 0)		return INSTALL_ERROR;	if(logProc)		(logProc)(pLog, true, Message,			"[jedit.exe] Calling uninstall module to delete registration entries only.\n");	int nReturnValue = (func)();	FreeLibrary(hModule);	return nReturnValue;}int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData){	lParam, lpData;	if(uMsg == BFFM_INITIALIZED)	{		SetWindowText(hwnd, "jEditLauncher Installation");		RECT rcDesktop, rcDlg;		::GetWindowRect(hwnd, &rcDlg);		::SystemParametersInfo(SPI_GETWORKAREA, NULL, &rcDesktop, NULL);		int dlgWidth = rcDlg.right - rcDlg.left;		int dlgHeight = rcDlg.bottom - rcDlg.top;		// Note: find dialog's upper left based on rcDesktop		int xLeft = (rcDesktop.left + rcDesktop.right) / 2 - dlgWidth / 2;		int yTop = (rcDesktop.top + rcDesktop.bottom) / 2 - dlgHeight / 2;		// NOTE: map screen coordinates to child coordinates		::SetWindowPos(hwnd, NULL, xLeft, yTop, -1, -1,			SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);	}	return 0;}bool TryInstall(){	if(IDYES != MessageBox(0, CString((LPCSTR)IDS_MSG_INSTALLQUERY),		szApp, MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON1))	{		::MessageBox(0, CString((LPCSTR)IDS_ERR_NEEDINSTALL),			szApp, MB_ICONEXCLAMATION);		return false;	}	char szJavaDir[MAX_PATH];	return GetJavaDir(szJavaDir) && (INSTALL_ERROR != Install(szJavaDir));}bool GetJavaDir(char *lpszDir){	bool bFound = false;	BROWSEINFO brinfo;	ZeroMemory(&brinfo, sizeof(BROWSEINFO));	brinfo.hwndOwner = GetDesktopWindow();	brinfo.lpfn = BrowseCallbackProc;	brinfo.lpszTitle = _T("Select folder with location of Java executable");	brinfo.ulFlags = BIF_RETURNONLYFSDIRS;	brinfo.pszDisplayName = lpszDir;	while(!bFound)	{		LPITEMIDLIST pIDList = SHBrowseForFolder(&brinfo);		if(pIDList == 0)			return false;		SHGetPathFromIDList(pIDList, lpszDir);		IMalloc *piMalloc = 0;		if(SUCCEEDED(SHGetMalloc(&piMalloc)))		{			piMalloc->Free(pIDList);			piMalloc->Release();		}		CString strJavaExec(lpszDir);		strJavaExec += _T("\\javaw.exe");		if(GetFileAttributes(strJavaExec) != -1)		{			bFound = true;		}		else		{			CString strMsg;			strMsg.Format(IDS_ERR_JAVA_NOT_FOUND, lpszDir);			if(IDYES != MessageBox(0, strMsg, szApp, MB_ICONQUESTION |				MB_YESNO | MB_DEFBUTTON1))			{				::MessageBox(0, CString((LPCSTR)IDS_ERR_NEEDINSTALL),					szApp, MB_ICONEXCLAMATION);				return false;			}		}	}	return bFound;}// NOTE: check if this version of jEditLauncher is installed// NOTE: checks both class registration and command line parameteresbool IsInstalled(){	HKEY hKey;	int nResult = RegOpenKeyEx(HKEY_CLASSES_ROOT, szCOMClassName, 0,		KEY_READ, &hKey);	RegCloseKey(hKey);	if(nResult != ERROR_SUCCESS)		return false;	nResult = RegOpenKeyEx(HKEY_CURRENT_USER, szVersion, 0, KEY_READ, &hKey);	RegCloseKey(hKey);	return (nResult == ERROR_SUCCESS);}void CloseLog(){	if(pLog != 0)	{		LogCloseFunc closeProc =			(LogCloseFunc)GetProcAddress(hLogModule, "CloseLog");		if(closeProc != 0)			(closeProc)(pLog);		pLog = 0;	}	if(hLogModule)		FreeLibrary(hLogModule);	hLogModule = 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久综合| 亚洲免费观看高清| 亚洲国产成人在线| 偷拍亚洲欧洲综合| 成人少妇影院yyyy| 欧美成人欧美edvon| 亚洲欧美日韩久久| 丁香五精品蜜臀久久久久99网站| 欧美日韩精品免费观看视频| 亚洲区小说区图片区qvod| 国产一区二区三区在线观看精品| 欧美日韩国产大片| 伊人开心综合网| 99久久伊人精品| 国产欧美视频一区二区| 免费在线一区观看| 欧美亚洲国产bt| 依依成人精品视频| av一区二区不卡| 国产精品美女视频| 国产99久久久国产精品潘金| 欧美不卡一区二区三区| 日韩av中文字幕一区二区三区| 在线观看亚洲精品视频| 136国产福利精品导航| 国产成人在线免费| 久久久久97国产精华液好用吗| 美女脱光内衣内裤视频久久影院| 这里只有精品99re| 日韩vs国产vs欧美| 日韩欧美亚洲国产另类| 美女视频黄频大全不卡视频在线播放 | 香蕉成人伊视频在线观看| 91精品欧美福利在线观看| 亚洲欧美偷拍另类a∨色屁股| 国产精品77777| 久久女同互慰一区二区三区| 国产乱码一区二区三区| 国产视频在线观看一区二区三区| 国产九九视频一区二区三区| 国产欧美一区二区精品性| 国产成人精品免费看| 亚洲国产精品ⅴa在线观看| 国产91精品一区二区麻豆网站| 中文字幕成人网| 99riav久久精品riav| 一区二区视频在线| 欧美日韩高清影院| 免费在线欧美视频| 久久久91精品国产一区二区精品| 国产成人午夜视频| 亚洲丝袜自拍清纯另类| 欧美在线免费视屏| 免费久久精品视频| 国产欧美综合色| 日本高清不卡aⅴ免费网站| 一区二区欧美在线观看| 91精品国产黑色紧身裤美女| 精品一区精品二区高清| 国产精品久久久久久亚洲伦 | 日日噜噜夜夜狠狠视频欧美人| 69久久夜色精品国产69蝌蚪网| 久久精品国产免费看久久精品| 国产亚洲污的网站| 在线视频一区二区三| 日本成人在线电影网| 欧美激情综合网| 717成人午夜免费福利电影| 国产91在线看| 午夜激情综合网| 国产情人综合久久777777| 色综合天天综合网天天狠天天| 日本强好片久久久久久aaa| 国产网站一区二区三区| 精品视频免费在线| 国产成人亚洲精品青草天美| 婷婷成人激情在线网| 欧美激情在线看| 日韩一级片网址| 在线观看视频91| 国产成人精品午夜视频免费| 日日摸夜夜添夜夜添亚洲女人| 国产精品私人自拍| 精品精品国产高清一毛片一天堂| 91浏览器打开| 成人综合激情网| 久久99热这里只有精品| 亚洲国产婷婷综合在线精品| 国产欧美日韩在线| 日韩欧美国产三级| 555www色欧美视频| 日本久久电影网| av在线播放不卡| 成人深夜视频在线观看| 国精产品一区一区三区mba桃花 | 极品少妇xxxx偷拍精品少妇| 亚洲一二三区不卡| 亚洲欧洲日韩一区二区三区| 久久久国产一区二区三区四区小说| 欧美日韩中文另类| 一本色道久久综合精品竹菊| 粉嫩一区二区三区性色av| 国产在线国偷精品产拍免费yy| 日韩不卡一区二区三区| 午夜精品福利视频网站| 亚洲1区2区3区4区| 亚洲国产精品久久久久秋霞影院 | 国产日韩综合av| 精品日韩欧美在线| 欧美成人精品福利| 日韩精品一区二区在线观看| 欧美一级国产精品| 日韩精品中文字幕一区二区三区| 欧美久久久久久蜜桃| 欧美日韩1234| 91精品国产综合久久久久久久久久 | 中文在线资源观看网站视频免费不卡| 日韩精品一区二区三区四区| 日韩欧美一级二级三级久久久| 欧美一级国产精品| wwwwww.欧美系列| 国产日韩亚洲欧美综合| 国产精品天干天干在线综合| 亚洲欧美偷拍另类a∨色屁股| 亚洲乱码国产乱码精品精98午夜| 一区二区三区欧美在线观看| 亚洲一区视频在线| 日本女优在线视频一区二区| 久久精品国产999大香线蕉| 韩日欧美一区二区三区| 粉嫩蜜臀av国产精品网站| 91丝袜美腿高跟国产极品老师 | 久久99日本精品| 久久国产剧场电影| 国产69精品一区二区亚洲孕妇| 国产河南妇女毛片精品久久久| 成人激情黄色小说| 在线视频你懂得一区| 欧美一区二区啪啪| 久久久久久久久久久久电影| 国产精品你懂的| 香蕉加勒比综合久久| 国产在线精品国自产拍免费| eeuss鲁片一区二区三区 | 成人免费毛片嘿嘿连载视频| 色噜噜偷拍精品综合在线| 欧美一区国产二区| 国产精品区一区二区三区| 亚洲伦理在线免费看| 免费看欧美美女黄的网站| 成人精品在线视频观看| 欧美日韩高清在线播放| 久久久久久久免费视频了| 亚洲一区二区三区视频在线播放 | 欧美精品一区二区高清在线观看 | 成人a免费在线看| 欧美肥妇毛茸茸| 欧美国产日韩亚洲一区| 亚洲第一久久影院| 国产成人av一区二区三区在线观看| 在线观看国产91| 久久久国产精品午夜一区ai换脸| 亚洲综合一区二区| 成人免费毛片嘿嘿连载视频| 欧美一区二区三区日韩视频| 亚洲手机成人高清视频| 久久超碰97中文字幕| 欧美在线free| 国产精品国产a| 韩国女主播一区| 欧美精品在欧美一区二区少妇| 综合中文字幕亚洲| 国产精品亚洲一区二区三区在线 | 亚洲成人午夜电影| 岛国一区二区三区| 欧美va亚洲va香蕉在线| 亚洲高清在线视频| www.综合网.com| 2021中文字幕一区亚洲| 日韩精品五月天| 91搞黄在线观看| 中文字幕在线免费不卡| 国产精品1区二区.| 精品国产一区二区国模嫣然| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美三级午夜理伦三级中视频| 亚洲日本在线观看| 99久久久免费精品国产一区二区| 久久久国产精品麻豆| 国内成人免费视频| 欧美www视频| 麻豆精品新av中文字幕| 91精品一区二区三区久久久久久 | 一区二区三区在线视频播放| 国产成人av电影在线观看| 精品国产乱码久久久久久老虎| 男女男精品视频| 精品久久国产老人久久综合| 免费人成黄页网站在线一区二区| 91精品国产91久久久久久最新毛片|