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

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

?? regkey.cpp

?? Visual+C++網(wǎng)絡(luò)通信協(xié)議分析
?? 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一区二区三区免费野_久草精品视频
久久精品一区二区三区av| av亚洲精华国产精华精| 91精品欧美久久久久久动漫| 亚洲成人一区在线| 91麻豆精品国产自产在线观看一区 | 欧美视频你懂的| 亚洲一区二区三区在线| 欧美日韩国产一级二级| 麻豆精品视频在线观看| 欧美国产成人精品| 日本乱码高清不卡字幕| 日韩高清一区二区| 欧美成人伊人久久综合网| 国产精品 日产精品 欧美精品| 国产目拍亚洲精品99久久精品| 96av麻豆蜜桃一区二区| 日韩精品一卡二卡三卡四卡无卡| 欧美成人艳星乳罩| 成人a免费在线看| 亚洲午夜电影网| 久久久久88色偷偷免费| 日本韩国欧美在线| 精品在线亚洲视频| 亚洲欧美另类在线| 欧美xxxxx牲另类人与| 不卡av在线网| 日韩经典中文字幕一区| 国产农村妇女精品| 在线播放/欧美激情| 成人综合婷婷国产精品久久蜜臀| 一区二区三区国产| 久久久久久电影| 欧美日韩精品综合在线| 国产成人av一区| 亚洲成人三级小说| 国产精品嫩草影院com| 欧美日韩激情一区二区| 成人免费毛片高清视频| 日本欧美加勒比视频| 亚洲视频你懂的| 久久人人爽人人爽| 555夜色666亚洲国产免| 91免费看`日韩一区二区| 国产一区在线看| 爽好多水快深点欧美视频| 国产欧美日韩中文久久| 制服丝袜亚洲网站| 在线观看免费成人| 成人av网站免费观看| 精品中文字幕一区二区| 亚洲成人在线免费| 亚洲欧美日韩中文字幕一区二区三区 | 色老汉av一区二区三区| 粉嫩在线一区二区三区视频| 日本免费新一区视频| 亚洲人成亚洲人成在线观看图片| 久久亚洲免费视频| 欧美二区在线观看| 欧美在线视频不卡| 播五月开心婷婷综合| 国产一区美女在线| 久久99精品国产.久久久久| 天天综合网天天综合色| 亚洲午夜久久久久久久久电影网 | 日韩美女在线视频| 欧美日韩一区精品| 欧美性xxxxxxxx| 欧美中文字幕一区| 色婷婷狠狠综合| 91在线看国产| 91片黄在线观看| 色狠狠综合天天综合综合| 99在线精品观看| 97精品久久久午夜一区二区三区| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 一区二区免费看| 亚洲一区免费在线观看| 亚洲伊人色欲综合网| 亚洲国产精品精华液网站| 亚洲一区二区五区| 亚洲成人av一区二区三区| 午夜精品免费在线观看| 奇米精品一区二区三区四区| 日本午夜精品一区二区三区电影| 免费一级片91| 国内精品国产成人| 成人一道本在线| 99国产麻豆精品| 欧美日韩激情在线| 欧美va亚洲va在线观看蝴蝶网| 欧美成人女星排名| 欧美激情中文字幕一区二区| 日本一二三不卡| 一卡二卡欧美日韩| 日韩电影在线一区二区三区| 久久91精品久久久久久秒播| 国产老妇另类xxxxx| 99re这里只有精品6| 欧美视频在线一区| 欧美精品一区男女天堂| 欧美国产日韩精品免费观看| 综合色天天鬼久久鬼色| 亚洲午夜日本在线观看| 久久国产视频网| 国产成人三级在线观看| 欧美在线影院一区二区| 亚洲精品一区在线观看| 成人欧美一区二区三区在线播放| 亚洲国产精品视频| 国产真实乱对白精彩久久| 成人福利视频网站| 欧美精品少妇一区二区三区| 久久综合av免费| 亚洲综合视频在线| 国内久久婷婷综合| 色婷婷av一区二区| 精品国产3级a| 亚洲一区电影777| 国产99久久久国产精品潘金 | 精品无人码麻豆乱码1区2区| 成人黄色片在线观看| 欧美日产在线观看| 中文无字幕一区二区三区| 三级久久三级久久久| 成人久久视频在线观看| 制服丝袜激情欧洲亚洲| 亚洲视频 欧洲视频| 精品一区二区精品| 精品视频999| 一色屋精品亚洲香蕉网站| 免费观看日韩电影| 在线观看av不卡| 日本一区二区三区dvd视频在线| 亚洲午夜影视影院在线观看| 顶级嫩模精品视频在线看| 欧美一级二级在线观看| 亚洲一区精品在线| 91视频在线观看| 日本一区二区免费在线观看视频 | 99精品国产热久久91蜜凸| 久久这里只有精品视频网| 日韩中文字幕亚洲一区二区va在线| 不卡的av网站| 欧美国产激情二区三区 | 日韩成人dvd| 在线观看日韩电影| 亚洲久草在线视频| 成人高清伦理免费影院在线观看| 欧美成人精品福利| 欧美96一区二区免费视频| 欧美三级午夜理伦三级中视频| 国产精品二三区| 国产一区二区三区日韩| 日韩欧美久久久| 麻豆国产精品777777在线| 欧美日韩一区视频| 亚洲成人av福利| 欧美日韩国产在线观看| 亚洲精品国产精品乱码不99| av不卡一区二区三区| 欧美国产日韩在线观看| 国产精品一区二区在线播放 | 久久在线免费观看| 国内精品视频一区二区三区八戒| 日韩一区二区在线看| 亚洲大片免费看| 欧美久久一二三四区| 亚洲女人的天堂| 在线观看免费一区| 亚洲韩国精品一区| 欧美系列在线观看| 亚洲超碰97人人做人人爱| 欧美日韩色一区| 青青草原综合久久大伊人精品优势| 91.麻豆视频| 久久超碰97人人做人人爱| 精品日产卡一卡二卡麻豆| 久久99精品国产.久久久久久| wwww国产精品欧美| 成人av资源在线| 亚洲永久精品国产| 欧美一区二区成人| 精品一区二区三区香蕉蜜桃| 欧美精品一区二区三区四区| 国产成人精品免费网站| 国产精品欧美久久久久无广告| www.激情成人| 亚洲一区二区精品视频| 欧美大片拔萝卜| 成人不卡免费av| 午夜视频在线观看一区| 日韩一二在线观看| 国产91精品在线观看| 亚洲欧美日韩系列| 欧美喷水一区二区| 国产成人免费xxxxxxxx| 亚洲精品国产无套在线观| 日韩视频免费观看高清完整版| 国产一区二区三区久久悠悠色av| 最近中文字幕一区二区三区|