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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? regkey.cpp

?? VC通信程序源代碼.TCP/UDP高級編程,TCP,IP終端程序源代碼等.
?? CPP
字號:
// RegKey.cpp : implementation file
//
//////////////////////////////////////////////////////////////////////////////////
//																				//
//			1998. EarthWalk Designs Software, by Jay Wheeler.					//
//			All inquiries and/or comments to Jay@EarthWalkDesigns.com			//
//			Latest version can be downloaded from:								//
//																				//
//				http://www.earthwalkdesigns.com									//
//																				//
//////////////////////////////////////////////////////////////////////////////////
//																				//
//			Designed using Microsoft VisualC++ 4.2 and MFC						//
//			Tested on WindowsNT 4.0 Workstation and Server						//
//																				//
//////////////////////////////////////////////////////////////////////////////////
//																				//
//			This software is released into the public domain as is and			//
//			without warranty.													//
//																				//
//			Use it in good health, and please let me know if it was useful.		//
//			If you make improvements or fixed problems, please drop me an		//
//			e-mail describing your changes.  I will try to incorporate			//
//			them into this package so that others may benefit from your			//
//			improvements.														//
//																				//
//			Enjoy!																//
//																				// 
//////////////////////////////////////////////////////////////////////////////////
//																				//
//			RegKey Class - Derived from CWnd, base class						//
//																				//
//		Provides the following class methods for WindowsNT 4.0 systems			//
//		utilizing the WindowsNT Winsock 2 interface to the Internet.			//
//																				//
//		GetRegistryValue														//
//			If passed an integer value, Get the specified integer value.		//
//			if passed a DWORD value, get the specified DWORD value.				//
//			if passed a xxx_SZ value, get the specified string value.			//
//																				//
//			Get the specified value from the system registry.  Specify			//
//			the Registry table, key and entry for the value.					//
//			A value of TRUE is returned if the value is found, else FALSE.		//
//																				//
//		SetRegistryValue														//
//			if passed an integer value, set the specified DWORD_SZ				//
//			if passed a DWORD value, set the specified DWORD_SZ					//
//			if passed a CString value, set the specified xxx_SZ value			//
//																				//
//			Set the specified value in the system registry.  If the entry		//
//			does not exist, it is created.  Specify	the Registry table, key		//
//			and entry for the value.  A value of TRUE is returned if the		//
//			entry is created, else FALSE.										//
//																				//
//////////////////////////////////////////////////////////////////////////////////
//																				//
//		Useage:																	//
//			To use this class, copy the files RegKey.cpp and RegKey.h to		//
//			the same directory as your project.	Include RegKey.cpp in your		//
//			project.															//
//																				//
//////////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "RegKey.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// RegKey

RegKey::RegKey()
{
}

RegKey::~RegKey()
{
}


BEGIN_MESSAGE_MAP(RegKey, CWnd)
	//{{AFX_MSG_MAP(RegKey)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// RegKey message handlers

//////////////////////////////////////////////////////////////////////////////////
//																				//
//			Get the specified value from the system registry.  Specify			//
//			the Registry table, key and entry for the value.					//
//			A value of TRUE is returned if the value is found, else FALSE.		//
//																				//
//////////////////////////////////////////////////////////////////////////////////
BOOL RegKey::GetRegistryValue(HKEY RootKey, CString RegKey, CString RegEntry, LPINT RegValue, LPDWORD RegType)
{
	HKEY hKey;
	
	if(RegOpenKeyEx(RootKey,
				    (LPCSTR)RegKey,
					0,
					KEY_ALL_ACCESS,
					&hKey) != ERROR_SUCCESS)
		return FALSE;

	unsigned long	BufferSize=80L;
	char			ValueBuffer[80];
	CString			regname=RegEntry;
	DWORD			dwType = NULL;
	
	if(RegQueryValueEx(hKey,
					   regname,
					   NULL,
					   (LPDWORD)dwType,
					   (LPBYTE)ValueBuffer,
					   &BufferSize) == ERROR_SUCCESS)
	{
		DWORD		FetchVal;

		FetchVal = *((long *)ValueBuffer);
		*RegValue = (int)FetchVal;
		*RegType = dwType;
		RegCloseKey (hKey);

		return TRUE;
	}

	RegCloseKey (hKey);
	
	return FALSE;

}

//////////////////////////////////////////////////////////////////////////////////
//																				//
//			Set the specified value in the system registry.  If the entry		//
//			does not exist, it is created.  Specify	the Registry table, key		//
//			and entry for the value.  A value of TRUE is returned if the		//
//			entry is created, else FALSE.										//
//																				//
//////////////////////////////////////////////////////////////////////////////////
BOOL RegKey::SetRegistryValue(HKEY RootKey, CString RegKey, CString RegEntry, int RegValue, DWORD RegType)
{
	HKEY			hKey;
	DWORD			result;
	
	if(RegCreateKeyEx (RootKey,
					   (LPCSTR)RegKey,
					   0,
					   NULL,
					   REG_OPTION_NON_VOLATILE,
					   KEY_ALL_ACCESS,
					   NULL,
					   &hKey,
					   &result) != ERROR_SUCCESS)
			return FALSE;

	DWORD		regval = (long)RegValue;
	CString		regname = RegEntry;

	if (RegSetValueEx (hKey,
					   RegEntry,
					   0,
					   RegType,
					   (unsigned char *)&regval,
					   sizeof(DWORD)) != ERROR_SUCCESS)
	{
		RegCloseKey (hKey);
		return FALSE;
	}

	RegCloseKey (hKey);

	return TRUE;

}

//////////////////////////////////////////////////////////////////////////////////
//																				//
//			Get the specified value from the system registry.  Specify			//
//			the Registry table, key and entry for the value.					//
//			A value of TRUE is returned if the value is found, else FALSE.		//
//																				//
//////////////////////////////////////////////////////////////////////////////////
BOOL RegKey::GetRegistryValue(HKEY RootKey, CString RegKey, CString RegEntry, LPDWORD RegValue, LPDWORD RegType)
{
	HKEY hKey;
	
	if(RegOpenKeyEx(RootKey,
				    (LPCSTR)RegKey,
					0,
					KEY_ALL_ACCESS,
					&hKey) != ERROR_SUCCESS)
		return FALSE;

	unsigned long	BufferSize=80L;
	char			ValueBuffer[80];
	CString			regname=RegEntry;
	DWORD			dwType = NULL;
	
	if(RegQueryValueEx(hKey,
					   regname,
					   NULL,
					   (LPDWORD)dwType,
					   (LPBYTE)ValueBuffer,
					   &BufferSize) == ERROR_SUCCESS)
	{
		*RegValue = *((DWORD *)ValueBuffer);
		*RegType = dwType;
		RegCloseKey (hKey);

		return TRUE;
	}

	RegCloseKey (hKey);
	
	return FALSE;

}

//////////////////////////////////////////////////////////////////////////////////
//																				//
//			Set the specified value in the system registry.  If the entry		//
//			does not exist, it is created.  Specify	the Registry table, key		//
//			and entry for the value.  A value of TRUE is returned if the		//
//			entry is created, else FALSE.										//
//																				//
//////////////////////////////////////////////////////////////////////////////////
BOOL RegKey::SetRegistryValue(HKEY RootKey, CString RegKey, CString RegEntry, DWORD RegValue, DWORD RegType)
{
	HKEY			hKey;
	DWORD			result;
	
	if(RegCreateKeyEx (RootKey,
					   (LPCSTR)RegKey,
					   0,
					   NULL,
					   REG_OPTION_NON_VOLATILE,
					   KEY_ALL_ACCESS,
					   NULL,
					   &hKey,
					   &result) != ERROR_SUCCESS)
			return FALSE;

	CString		regname = RegEntry;

	if (RegSetValueEx (hKey,
					   RegEntry,
					   0,
					   RegType,
					   (unsigned char *)&RegValue,
					   sizeof(DWORD)) != ERROR_SUCCESS)
	{
		RegCloseKey (hKey);
		return FALSE;
	}

	RegCloseKey (hKey);

	return TRUE;

}

//////////////////////////////////////////////////////////////////////////////////
//																				//
//			Get the specified string value from the system registry.  Specify	//
//			the Registry table, key and entry for the string.					//
//			A value of TRUE is returned if the string is found, else FALSE.		//
//																				//
//////////////////////////////////////////////////////////////////////////////////
BOOL RegKey::GetRegistryValue(HKEY RootKey, CString RegKey, CString RegEntry, CString *RegValue, LPDWORD RegType)
{
	HKEY				hKey;
	
	if (RegOpenKeyEx (RootKey,
					  (LPCSTR)RegKey,
					  0,
					  KEY_ALL_ACCESS,
					  &hKey) != ERROR_SUCCESS)
		return FALSE;

	unsigned long		BufferSize = 80L;
	char				ValueBuffer[80];
	CString				regname = RegEntry;
	DWORD				dwType = NULL;

	if (RegQueryValueEx (hKey,
						 regname,
						 NULL,
						 (LPDWORD)dwType,
						 (LPBYTE)ValueBuffer,
						 &BufferSize) == ERROR_SUCCESS)
	{
		*RegValue = ValueBuffer;
		*RegType = dwType;

		RegCloseKey (hKey);
		
		return TRUE;
	}

	RegCloseKey (hKey);
	return FALSE;

}

//////////////////////////////////////////////////////////////////////////////////
//																				//
//			Set the specified string value in the system registry.  If the		//
//			entry does not exist, it is created.  Specify the Registry table,	//
//			key and entry for the value.  A value of TRUE is returned if the	//
//			entry is created, else FALSE.										//
//																				//
//////////////////////////////////////////////////////////////////////////////////
BOOL RegKey::SetRegistryValue(HKEY RootKey, CString RegKey, CString RegEntry, CString RegValue, DWORD RegType)
{
	HKEY				hKey;
	DWORD				result;
	
	if (RegCreateKeyEx (RootKey,
					    (LPCSTR)RegKey,
					    0,
					    NULL,
					    REG_OPTION_NON_VOLATILE,
					    KEY_ALL_ACCESS,
					    NULL,
					    &hKey,
					    &result) != ERROR_SUCCESS)
			return FALSE;

	char				ValueBuffer[80];
	
	strcpy (ValueBuffer, (LPCSTR)RegValue);

	CString				regname = RegEntry;

	if (RegSetValueEx (hKey,
				       regname,
					   0,
					   RegType,
					   (unsigned char*)ValueBuffer,
					   strlen(ValueBuffer) + 1) != ERROR_SUCCESS)
	{
		RegCloseKey (hKey);
		return FALSE;
	}

	RegCloseKey (hKey);

	return TRUE;

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品的网站| 久久人人爽爽爽人久久久| 亚洲欧美日韩国产综合在线| 成人美女视频在线观看| 国产精品午夜免费| 91小视频免费看| 亚洲激情在线激情| 91精品婷婷国产综合久久性色 | 成人午夜短视频| 欧美国产成人精品| 在线观看视频一区二区| 奇米影视一区二区三区| 日韩视频免费直播| 成人在线视频一区| 一区二区在线观看免费视频播放 | 国产ts人妖一区二区| 国产精品丝袜在线| 欧美日本高清视频在线观看| 久久精品国产一区二区三区免费看 | 欧美激情一区三区| 色婷婷久久久久swag精品| 婷婷成人综合网| 久久一夜天堂av一区二区三区| av亚洲产国偷v产偷v自拍| 午夜精品爽啪视频| 国产精品丝袜黑色高跟| 欧美日韩高清在线播放| 国产精品一区二区久激情瑜伽| 亚洲伦在线观看| 日韩欧美黄色影院| 色综合久久六月婷婷中文字幕| 日本va欧美va精品发布| 国产精品沙发午睡系列990531| 欧美专区日韩专区| 国产成a人无v码亚洲福利| 亚洲成a人v欧美综合天堂下载| 精品国产乱码久久久久久浪潮| 色综合天天性综合| 国产在线不卡一区| 亚洲与欧洲av电影| 亚洲国产激情av| 欧美一级一区二区| 色女孩综合影院| 国产精品一区在线| 日韩二区三区四区| 亚洲一区欧美一区| 中文字幕亚洲区| 精品日韩欧美在线| 欧美美女一区二区在线观看| 99视频精品在线| 久草中文综合在线| 丝袜国产日韩另类美女| 亚洲视频一二三区| 国产精品欧美综合在线| 欧美变态口味重另类| 欧美精品视频www在线观看| 91在线免费播放| 国产成人8x视频一区二区| 欧洲精品一区二区| 成人免费看视频| 国产麻豆精品久久一二三| 日本女优在线视频一区二区| 夜夜嗨av一区二区三区| 一区在线观看免费| 欧美激情一区二区三区在线| 精品国产一区二区三区久久影院| 欧美巨大另类极品videosbest | 亚洲午夜成aⅴ人片| 中文字幕亚洲一区二区va在线| 国产三级精品在线| 国产亚洲精品bt天堂精选| 久久免费午夜影院| 欧美成人一级视频| 精品久久国产老人久久综合| 欧美一卡2卡三卡4卡5免费| 欧美一卡在线观看| 日韩欧美国产小视频| 日韩欧美国产系列| 日韩视频免费直播| 欧美大片一区二区| 久久综合九色综合欧美就去吻| 精品精品国产高清a毛片牛牛| 日韩精品最新网址| 久久人人爽爽爽人久久久| 国产视频911| 中文字幕亚洲视频| 亚洲成av人影院| 天堂一区二区在线| 麻豆精品一区二区综合av| 狠狠色狠狠色合久久伊人| 国产福利精品一区二区| av中文字幕一区| 欧美三级电影一区| 日韩精品中文字幕在线不卡尤物| 日韩欧美一二三四区| 国产欧美视频一区二区| 亚洲人成伊人成综合网小说| 亚洲综合一区二区| 美女诱惑一区二区| 国产成人av网站| 色噜噜狠狠色综合中国| 91精品婷婷国产综合久久性色| 欧美不卡一二三| 国产精品久久久一区麻豆最新章节| 亚洲精品福利视频网站| 日韩电影在线一区二区| 高清在线成人网| 欧美亚洲国产怡红院影院| 日韩一区二区视频在线观看| 久久久久久综合| 一区二区三区色| 激情伊人五月天久久综合| av欧美精品.com| 欧美一二三四区在线| 亚洲国产精品v| 日韩影视精彩在线| 国产91丝袜在线观看| 欧美探花视频资源| 国产女主播视频一区二区| 亚洲一区二区3| 国产传媒一区在线| 欧美一区二区视频观看视频| 中文字幕不卡一区| 日本欧美肥老太交大片| 91在线码无精品| 久久久久久99精品| 日韩中文字幕亚洲一区二区va在线 | 国产精品国产三级国产普通话蜜臀| 91免费在线看| 精品久久久久久久久久久久久久久久久 | 亚洲愉拍自拍另类高清精品| 韩国三级在线一区| 欧美亚一区二区| 国产亚洲综合av| 蜜桃视频一区二区三区| 在线观看三级视频欧美| 国产精品久99| 国精产品一区一区三区mba视频| 欧美日韩电影在线播放| 一区在线播放视频| 国产成人精品亚洲日本在线桃色| 欧美日韩国产综合久久| 亚洲欧洲国产日韩| 国产精一区二区三区| 欧美一区二区三区色| 亚洲一区二区三区四区的| 99久久综合狠狠综合久久| 久久精品综合网| 黄网站免费久久| 日韩免费一区二区| 蜜臀久久久99精品久久久久久| 欧美日韩一区不卡| 亚洲精品视频免费观看| 成人av在线一区二区三区| 久久久久国产一区二区三区四区 | 国产日韩欧美麻豆| 韩国v欧美v亚洲v日本v| 91精品欧美一区二区三区综合在| 亚洲一二三四在线| 91国偷自产一区二区使用方法| 亚洲天堂精品在线观看| jlzzjlzz亚洲日本少妇| 国产精品福利一区二区三区| a在线欧美一区| 亚洲色图制服诱惑| 91美女片黄在线观看| 亚洲视频一区二区在线| 91一区在线观看| 一区二区三区精品在线观看| 色欧美乱欧美15图片| 亚洲午夜日本在线观看| 欧美日韩国产综合一区二区 | 国产福利精品一区二区| 国产婷婷一区二区| 国产91在线观看| 综合久久国产九一剧情麻豆| 一本大道av一区二区在线播放| 亚洲免费av观看| 欧美日韩一级大片网址| 日韩中文字幕亚洲一区二区va在线| 制服.丝袜.亚洲.中文.综合| 蜜臀av在线播放一区二区三区| 精品日韩av一区二区| 国产精一品亚洲二区在线视频| 日本一区免费视频| 99精品欧美一区二区三区小说| 一区二区三区在线免费视频| 欧美日韩dvd在线观看| 久久99久久久久| 国产色产综合色产在线视频| 97久久超碰国产精品电影| 亚洲一区二区三区不卡国产欧美| 欧美性受极品xxxx喷水| 午夜精品国产更新| 久久天堂av综合合色蜜桃网| 成人精品免费看| 亚洲福中文字幕伊人影院| 日韩欧美精品三级| 色综合天天狠狠| 九九视频精品免费|