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

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

?? regkey.cpp

?? VisualC++通信協(xié)議實現(xiàn)的源代碼
?? 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;

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久久久久美女| 亚洲精品网站在线观看| 精品免费99久久| 日韩欧美国产一区二区三区| 欧美二区三区91| 在线播放一区二区三区| 在线成人av网站| 在线播放视频一区| 日韩欧美一级二级三级| 精品捆绑美女sm三区| 精品国产精品网麻豆系列| 精品久久久久久最新网址| 欧美一级片在线看| 337p粉嫩大胆噜噜噜噜噜91av| 日韩午夜在线播放| 欧美精品一区男女天堂| 久久无码av三级| 欧美激情一区二区三区全黄| 亚洲国产激情av| 亚洲乱码中文字幕| 亚洲一区国产视频| 欧美日本一区二区三区| 欧美在线视频不卡| 色伊人久久综合中文字幕| 国产福利电影一区二区三区| 久久精品国产99国产精品| 视频在线在亚洲| 青青草视频一区| 亚洲成年人影院| 一区二区三区.www| 亚洲国产精品麻豆| 日韩av中文在线观看| 91国产丝袜在线播放| 91丨porny丨在线| 欧美日韩中文字幕一区| 精品国产一区二区三区久久久蜜月| 久久在线免费观看| 亚洲女人的天堂| 亚洲国产日韩精品| 九一九一国产精品| eeuss鲁片一区二区三区| 欧美网站一区二区| 欧美成人精精品一区二区频| 国产精品大尺度| 视频在线观看一区| 国产高清精品网站| 在线视频你懂得一区二区三区| 4438x成人网最大色成网站| 久久影音资源网| 亚洲精品欧美在线| 久久国产精品无码网站| av激情综合网| 日韩欧美一级片| 亚洲视频一二三区| 久久国内精品自在自线400部| 成人h版在线观看| 欧美一区二区三区婷婷月色| 国产日韩亚洲欧美综合| 亚洲1区2区3区视频| 风间由美中文字幕在线看视频国产欧美| 色综合久久综合网欧美综合网| 91精品国产91久久综合桃花| 国产精品盗摄一区二区三区| 老司机一区二区| 欧美亚洲国产一区在线观看网站 | 欧美另类变人与禽xxxxx| 久久亚洲一区二区三区明星换脸| 一区二区三区在线免费| 国产一区二区网址| 欧美三级日韩在线| 日本一区二区成人| 亚欧色一区w666天堂| av欧美精品.com| 国产亚洲人成网站| 蜜乳av一区二区三区| 美女免费视频一区二区| 欧美日韩国产一级二级| 亚洲国产成人精品视频| 日韩三级视频中文字幕| 午夜精品久久久久久久久久久| 懂色一区二区三区免费观看 | 美女视频一区二区三区| 色综合网站在线| 亚洲综合一二区| 国产91丝袜在线播放九色| 久久综合狠狠综合| 久久99精品国产麻豆婷婷洗澡| 99久久免费视频.com| 精品国产一区二区精华| 天堂久久一区二区三区| 欧美网站大全在线观看| 亚洲欧美日本韩国| 粉嫩在线一区二区三区视频| 欧美精品一区二区三区蜜桃 | 日韩黄色免费网站| 色婷婷久久久亚洲一区二区三区| 国产欧美日韩精品一区| 国产精品1024久久| 国产色爱av资源综合区| 国产在线视频精品一区| 2020国产精品久久精品美国| 精品在线你懂的| 精品国产3级a| 韩国中文字幕2020精品| 欧美videossexotv100| 美女视频黄频大全不卡视频在线播放| 欧美日韩一区二区不卡| 丝袜亚洲另类欧美综合| 欧美一区二区三区啪啪| 日韩国产成人精品| 欧美精品色综合| 午夜精品久久久久| 欧美疯狂性受xxxxx喷水图片| 日产国产欧美视频一区精品| 69久久夜色精品国产69蝌蚪网| 天堂成人免费av电影一区| 欧美色电影在线| 亚洲午夜精品在线| 成人免费视频caoporn| 国产精品私房写真福利视频| 成人动漫一区二区三区| 日本一区二区三区在线观看| 高清在线不卡av| 国产精品丝袜在线| 成人av高清在线| 中文字幕综合网| 高潮精品一区videoshd| 日韩美女视频一区二区| 91老司机福利 在线| 久久国产婷婷国产香蕉| 日韩欧美综合一区| 午夜精品在线看| 欧美一区二区三区日韩| 精品一区二区免费视频| 亚洲欧美成人一区二区三区| 欧美性生交片4| 欧美一卡2卡三卡4卡5免费| 欧美色大人视频| 91无套直看片红桃| 国产盗摄一区二区三区| 日本欧美一区二区在线观看| 欧美精品一区二区三区蜜桃| 欧美精品一卡二卡| jlzzjlzz亚洲日本少妇| 免费亚洲电影在线| 亚洲视频在线观看三级| 欧美日本一道本| 精品国产乱子伦一区| 国产一区二区三区四区五区美女 | 麻豆成人免费电影| 精品久久久网站| 91一区一区三区| 日本欧美一区二区| 久久久国产精品不卡| a亚洲天堂av| 免费黄网站欧美| 中文字幕第一区| 欧美日韩高清一区| 久久精品999| 久久久久国色av免费看影院| 日本国产一区二区| 老司机午夜精品| 亚洲三级电影网站| 欧美一区二区三区免费观看视频 | 欧美在线小视频| 久久精品999| 一区二区三区中文免费| 26uuu国产在线精品一区二区| 欧美一区二区在线免费播放| 成人精品国产一区二区4080| 午夜一区二区三区在线观看| 久久免费午夜影院| 在线日韩国产精品| 奇米777欧美一区二区| 亚洲精品成人悠悠色影视| 欧美va亚洲va在线观看蝴蝶网| 97久久人人超碰| 麻豆成人免费电影| 天堂va蜜桃一区二区三区| 国产精品欧美久久久久一区二区| 欧美日韩日日摸| 风流少妇一区二区| 亚洲欧洲成人自拍| 久久只精品国产| 欧美三级视频在线| 9i在线看片成人免费| 日韩国产在线观看| 亚洲国产成人精品视频| 亚洲国产精品成人久久综合一区| 欧美一级日韩不卡播放免费| 色综合网站在线| 97久久超碰国产精品电影| 久久成人18免费观看| 亚洲成人激情综合网| 国产精品色婷婷| 国产免费成人在线视频| 日韩一区二区精品| 欧美精选在线播放| 亚洲高清视频的网址| 国产a区久久久|