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

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

?? registry.cs

?? 取得GSM基站信息的程序NiceTrack以及源代碼
?? CS
字號:

using System;
using System.Runtime.InteropServices;

namespace NiceTracker.Libraries
{	
	/// <summary>
	/// Helper class to work with the Pocket PC registry
	/// </summary>
	public class Registry
	{
		public enum RootKey : uint
		{
			HKEY_CLASSES_ROOT = 0x80000000,
			HKEY_CURRENT_USER = 0x80000001,
			HKEY_LOCAL_MACHINE = 0x80000002,
			HKEY_USERS = 0x80000003
		}

		public enum KeyDisposition : int
		{
			REG_CREATED_NEW_KEY = 1,
			REG_OPENED_EXISTING_KEY = 2
		}

		private const int REG_NONE = 0;
		private const int REG_SZ = 1;
		private const int REG_EXPAND_SZ = 2;
		private const int REG_BINARY = 3;
		private const int REG_DWORD = 4;

		[DllImport("coredll.dll", EntryPoint="RegOpenKeyExW")]
		private static extern int RegOpenKeyExW(uint hKey,
			string lpSubKey,
			int ulOptions,
			int samDesired,
			ref int phkResult);

		[DllImport("coredll", EntryPoint="RegCreateKeyExW")]
		private static extern int RegCreateKeyExW(uint hKey,
			char[] lpSubKey,
			int lpReserved,
			string lpClass,
			int dwOptions,
			int samDesired,
			ref int lpSecurityAttributes,
			ref int phkResult,
			ref int lpdwDisposition);

		[DllImport("coredll.dll", EntryPoint="RegQueryValueExW")]
		private static extern int RegQueryValueExW(uint hKey,
			string lpValueName,
			int lpReserved,
			ref int lpType,
			byte[] lpData,
			ref int lpcbData);

		[DllImport("coredll.dll", EntryPoint="RegSetValueExW")]
		private static extern int RegSetValueExW(uint hKey,
			string lpValueName,
			int lpReserved,
			int lpType,
			byte[] lpData,
			int lpcbData);

		[DllImport("coredll.dll", EntryPoint="RegDeleteValueW")]
		private static extern int RegDeleteValueW(uint hKey, string lpValueName);

		[DllImport("coredll.dll", EntryPoint="RegDeleteKeyW")]
		private static extern int RegDeleteKeyW(uint hKey, string lpSubKey);

		[DllImport("coredll.dll", EntryPoint="RegCloseKey")]
		private static extern int RegCloseKey(uint hKey);

		public static int OpenKey(RootKey RootKey, string SubKey)
		{
			int hKey = 0;
			int ret = 0;
			try
			{
				RegOpenKeyExW((uint)RootKey, SubKey, 0, 0, ref hKey);
			}
			catch(Exception ex)
			{
				Console.WriteLine("Exception opening key: " + ex.Message);
			}
			if(ret != 0)
				Console.WriteLine("Failed to open key: " + ret.ToString());
			return hKey;
		}

		public static int CreateKey(RootKey RootKey, string SubKey, string KeyClass, ref KeyDisposition Disposition)
		{
			int hKey = 0;
			int disp = 0;
			int reserved = 0;
			int ret = 0;
			char[] key = new char[SubKey.Length];

			try
			{
				int len = key.GetLength(0);
				for(int i = 0 ; i < len ; i++)
					key[i] = SubKey[i];
				ret = RegCreateKeyExW((uint)RootKey, key, 0, KeyClass, 0, 0, ref reserved, ref hKey, ref disp);
			}
			catch(Exception ex)
			{
				Console.WriteLine("Exception creating key: " + ex.Message);
			}
			if(ret != 0)
				Console.WriteLine("Failed to create key: " + ret.ToString());
			else
				Disposition = (KeyDisposition)disp;

			return hKey;
		}

		public static int QueryValueInteger(int hKey, string ValueName)
		{
			int type = 0;
			int size = 0;
			byte[] data = null;
			// get value size
			RegQueryValueExW((uint)hKey, ValueName, 0, ref type, data, ref size);
			data = new byte[size];
			// get value data
			RegQueryValueExW((uint)hKey, ValueName, 0, ref type, data, ref size);
	
			if(type == REG_DWORD)
				return System.BitConverter.ToInt32(data, 0);
			else
				return 0;
		}

		public static byte[] QueryValueBinary(int hKey, string ValueName)
		{
			int type = 0;
			int size = 0;
			byte[] data = null;
			// get value size
			RegQueryValueExW((uint)hKey, ValueName, 0, ref type, data, ref size);
			data = new byte[size];
			// get value data
			RegQueryValueExW((uint)hKey, ValueName, 0, ref type, data, ref size);

			if(type == REG_BINARY)
				return data;
			else
				return null;
		}

		public static string QueryValueString(int hKey, string ValueName)
		{
			int type = 0;
			int size = 0;
			byte[] data = null;
			// get value size
			RegQueryValueExW((uint)hKey, ValueName, 0, ref type, data, ref size);
			Console.WriteLine("size: " + size.ToString());
			data = new byte[size];
			// get value data
			RegQueryValueExW((uint)hKey, ValueName, 0, ref type, data, ref size);
						
			if((type == REG_SZ) || (type == REG_EXPAND_SZ))
				return System.Text.UnicodeEncoding.Unicode.GetString(data, 0, size);
			else
				return "";
		}

		public static bool SetValue(int hKey, string ValueName, int Value)
		{
			byte[] val = System.BitConverter.GetBytes(Value);
			try
			{
				int ret = RegSetValueExW((uint)hKey, ValueName, 0, REG_DWORD, val, val.GetLength(0));
				if(ret != 0)
				{
					Console.WriteLine("Failed to set value: " + ret.ToString());
					return false;
				}
			}
			catch(Exception ex)
			{
				Console.WriteLine("Exception setting value: " + ex.Message);
			}
			return true;
		}

		public static bool SetValue(int hKey, string ValueName, String Value)
		{
			byte[] val = new byte[System.Text.UnicodeEncoding.Unicode.GetByteCount(Value) + 1];
			val = System.Text.UnicodeEncoding.Unicode.GetBytes(Value);
			val[val.GetUpperBound(0)] = 0;
			try
			{
				int ret = RegSetValueExW((uint)hKey, ValueName, 0, REG_SZ, val, val.GetLength(0));
				if(ret != 0)
				{
					Console.WriteLine("Failed to set value: " + ret.ToString());
					return false;
				}
			}
			catch(Exception ex)
			{
				Console.WriteLine("Exception setting value: " + ex.Message);
			}
			return true;
		}

		public static bool SetValue(int hKey, string ValueName, byte[] Value)
		{
			try
			{
				int ret = RegSetValueExW((uint)hKey, ValueName, 0, REG_BINARY, Value, Value.Length);
				if(ret != 0)
				{
					Console.WriteLine("Failed to set value key: " + ret.ToString());
					return false;
				}
			}
			catch(Exception ex)
			{
				Console.WriteLine("Exception setting value: " + ex.Message);
			}
			return true;
		}
		
		public static bool DeleteValue(int hKey, string lpValueName)
		{
			try
			{
				int ret = RegDeleteValueW((uint)hKey,lpValueName);
				if(ret != 0)
				{
					Console.WriteLine("Failed to delete value key");
					return false;
				}
			}
			catch(Exception ex)
			{
				Console.WriteLine("Exception deleting value: " + ex.Message);
			}
			return true;
		}

		public static bool DeleteKey(int hKey, string lpSubKey)
		{
			try
			{
				int ret = RegDeleteKeyW((uint)hKey, lpSubKey);
				if(ret != 0)
				{
					Console.WriteLine("Failed to delete key");
					return false;
				}
			}
			catch(Exception ex)
			{
				Console.WriteLine("Failed to delete key: " + ex.Message);
			}
			return true;
		}

		public static bool CloseKey(ref int hKey)
		{
			int ret = RegCloseKey((uint)hKey);
			if(ret != 0)
				return false;
			else
				hKey = 0;
			return true;
		}
		
		public static RootKey RootNameToValue(string KeyName)
		{
			if(KeyName.Equals(RootKey.HKEY_LOCAL_MACHINE.ToString()))
				return RootKey.HKEY_LOCAL_MACHINE;
			else if(KeyName.Equals(RootKey.HKEY_CLASSES_ROOT.ToString()))
				return RootKey.HKEY_CLASSES_ROOT;
			else if(KeyName.Equals(RootKey.HKEY_CURRENT_USER.ToString()))
				return RootKey.HKEY_CURRENT_USER;
			else if(KeyName.Equals(RootKey.HKEY_USERS.ToString()))
				return RootKey.HKEY_USERS;
			else
				return 0;
		}
		
		public Registry()
		{
		}
	}
	
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品欧美一区二区三区麻豆| 91视频免费观看| 欧美一级欧美三级在线观看| 午夜日韩在线观看| 91精选在线观看| 激情综合一区二区三区| 欧美激情中文字幕一区二区| 成人污视频在线观看| 国产精品三级电影| 91麻豆国产在线观看| 亚洲午夜免费视频| 宅男在线国产精品| 国产精品一区二区91| 国产精品第一页第二页第三页| 成人97人人超碰人人99| 一区二区三区四区av| 欧美日韩亚洲综合在线| 久久国内精品自在自线400部| 国产农村妇女精品| 欧美亚洲动漫精品| 加勒比av一区二区| 亚洲精品国产成人久久av盗摄 | 激情综合网最新| 国产精品久久久久aaaa樱花| 欧美日韩亚洲综合一区| 蜜臀va亚洲va欧美va天堂 | 风流少妇一区二区| 一区二区三区91| 精品成人一区二区| 91蜜桃免费观看视频| 日韩av不卡一区二区| 中文字幕欧美国产| 6080yy午夜一二三区久久| 国产99久久久国产精品免费看| 一区二区三区四区亚洲| 精品国产免费久久| 欧美亚洲一区二区三区四区| 狠狠色狠狠色综合日日91app| ●精品国产综合乱码久久久久| 91精品欧美福利在线观看| 成人一级黄色片| 日本在线不卡视频一二三区| 国产精品久久久久久久岛一牛影视| 欧美久久久久久蜜桃| 不卡高清视频专区| 久久99这里只有精品| 一区二区三区精品在线观看| 国产丝袜美腿一区二区三区| 欧美日韩在线播放三区| 99国产精品久久久| 国产一区二区在线影院| 日韩中文字幕麻豆| 一区二区三区产品免费精品久久75| 久久久久亚洲综合| 6080日韩午夜伦伦午夜伦| 91福利资源站| 91在线精品一区二区| 国产成人激情av| 麻豆精品精品国产自在97香蕉| 亚洲国产日韩综合久久精品| 日韩伦理电影网| 国产精品久久久久9999吃药| 2020国产精品自拍| 精品国产在天天线2019| 91精品国产全国免费观看| 欧美久久免费观看| 欧美日韩午夜在线| 欧美日韩在线播放三区| 欧美性三三影院| 在线一区二区三区做爰视频网站| 成+人+亚洲+综合天堂| 处破女av一区二区| 大白屁股一区二区视频| 成熟亚洲日本毛茸茸凸凹| 粉嫩蜜臀av国产精品网站| 国产精品羞羞答答xxdd| 国产一区视频网站| 豆国产96在线|亚洲| 国产精品一级黄| 国产精品一区二区男女羞羞无遮挡| 久久激情综合网| 国产成人免费视频一区| 成人精品一区二区三区四区| 成人精品视频网站| 色猫猫国产区一区二在线视频| 色综合久久综合| 欧美性猛交xxxxxx富婆| 欧美日韩中文字幕一区二区| 在线播放日韩导航| 日韩精品一区二| 中文字幕精品在线不卡| 亚洲天堂久久久久久久| 亚洲一线二线三线久久久| 调教+趴+乳夹+国产+精品| 另类中文字幕网| 国产馆精品极品| 97成人超碰视| 欧美日韩精品是欧美日韩精品| 欧美卡1卡2卡| www激情久久| 亚洲欧洲日产国码二区| 亚洲一区影音先锋| 久久99精品网久久| 99re这里只有精品6| 欧美日韩国产精选| 久久亚洲精精品中文字幕早川悠里| 国产精品色在线观看| 亚洲成人av资源| 国产精品一区免费在线观看| av不卡免费电影| 欧美一二三四区在线| 国产精品视频在线看| 亚洲午夜电影网| 国产麻豆精品在线观看| 94-欧美-setu| 日韩欧美国产精品| 成人欧美一区二区三区黑人麻豆| 五月激情丁香一区二区三区| 国产超碰在线一区| 欧美日韩免费一区二区三区| 国产亚洲精品bt天堂精选| 亚洲影院理伦片| 懂色av中文一区二区三区| 欧美体内she精高潮| 国产亚洲综合在线| 日韩精品乱码av一区二区| 成人高清伦理免费影院在线观看| 欧美色老头old∨ideo| 久久久久久久综合日本| 亚洲国产视频一区二区| 成人av网站在线观看免费| 欧美一区2区视频在线观看| 亚洲欧洲美洲综合色网| 久久se这里有精品| 欧美精品成人一区二区三区四区| 国产女同性恋一区二区| 美女脱光内衣内裤视频久久网站 | 国产乱人伦精品一区二区在线观看| 色噜噜狠狠成人网p站| 精品久久久久久久久久久久包黑料 | 亚洲电影第三页| 狠狠狠色丁香婷婷综合久久五月| 一本久道久久综合中文字幕 | 国产一区二区三区免费在线观看 | 亚洲综合丁香婷婷六月香| 91在线视频播放地址| 亚洲精品久久久蜜桃| 欧美在线观看视频一区二区| 一区二区三区欧美视频| 欧美精品自拍偷拍| 美女精品自拍一二三四| 久久综合色一综合色88| 成人综合激情网| 一区二区三区.www| 91精品国产一区二区人妖| 精品一区二区精品| 中文字幕欧美国产| 欧美亚洲高清一区| 麻豆91在线播放免费| 欧美国产成人在线| 色欧美乱欧美15图片| 日韩精品免费专区| 国产亚洲欧美日韩日本| 91视频一区二区三区| 无吗不卡中文字幕| 久久久亚洲精品一区二区三区| 99免费精品在线观看| 午夜精品久久久久久不卡8050| 日韩欧美aaaaaa| 99精品1区2区| 美女脱光内衣内裤视频久久网站 | 午夜精品福利一区二区三区av| 欧美老肥妇做.爰bbww| 国产一区高清在线| 亚洲激情图片一区| 精品国精品国产| 色欧美88888久久久久久影院| 日韩精品国产精品| 国产亚洲欧美一区在线观看| 日本大香伊一区二区三区| 美女视频网站黄色亚洲| 成人欧美一区二区三区视频网页| 在线成人免费观看| 99久久国产免费看| 精品一区二区三区蜜桃| 亚洲中国最大av网站| 国产婷婷色一区二区三区| 欧美三级电影一区| 国产不卡视频在线播放| 亚洲成av人在线观看| 亚洲国产精品v| 91精品国产综合久久精品| 99久久伊人网影院| 精东粉嫩av免费一区二区三区 | 国产一区二区三区四区五区美女| 亚洲另类一区二区| 国产亚洲一区二区三区| 欧美精品久久99久久在免费线 | 精品一区二区三区影院在线午夜 | 欧美乱妇15p|