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

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

?? mem.cs

?? 藍(lán)牙通訊
?? CS
字號(hào):
//==========================================================================================
//
//		OpenNETCF.Windows.Forms.Mem
//		Copyright (c) 2003, OpenNETCF.org
//
//		This library is free software; you can redistribute it and/or modify it under 
//		the terms of the OpenNETCF.org Shared Source License.
//
//		This library 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 OpenNETCF.org Shared Source License 
//		for more details.
//
//		You should have received a copy of the OpenNETCF.org Shared Source License 
//		along with this library; if not, email licensing@opennetcf.org to request a copy.
//
//		If you wish to contact the OpenNETCF Advisory Board to discuss licensing, please 
//		email licensing@opennetcf.org.
//
//		For general enquiries, email enquiries@opennetcf.org or visit our website at:
//		http://www.opennetcf.org
//
//		!!! A HUGE thank-you goes out to Casey Chesnut for supplying this class library !!!
//      !!! You can contact Casey at http://www.brains-n-brawn.com                      !!!
//
//==========================================================================================
using System;
using System.Runtime.InteropServices;

namespace OpenNETCF.Security.Cryptography.NativeMethods
{
	//http://smartdevices.microsoftdev.com/Learn/Articles/500.aspx#netcfadvinterop_topic3
	public class Mem
	{
		/// <summary>
		/// The CryptMemAlloc function allocates memory for a buffer. 
		/// It is used by all Crypt32.lib functions that return allocated buffers.
		/// </summary>
		/// <param name="cbSize">Number of bytes to be allocated. </param>
		/// <returns>Returns a pointer to the buffer allocated. 
		/// If the function fails, NULL is returned. </returns>
		//LPVOID WINAPI CryptMemAlloc(ULONG cbSize);
		[DllImport("crypt32.dll", EntryPoint="CryptMemAlloc", SetLastError=true)]
		public static extern IntPtr CryptMemAlloc(int cbSize);
		
		/// <summary>
		/// The CryptMemFree function frees memory allocated by 
		/// CryptMemAlloc or CryptMemRealloc.
		/// </summary>
		/// <param name="pv">Pointer to the buffer to be freed. </param>
		//void WINAPI CryptMemFree(LPVOID pv);
		[DllImport("crypt32.dll", EntryPoint="CryptMemFree", SetLastError=true)]
		public static extern void CryptMemFree(IntPtr pv);
		
		/// <summary>
		/// The CryptMemRealloc function frees the memory currently allocated for a buffer 
		/// and allocates memory for a new buffer.
		/// </summary>
		/// <param name="pv">Pointer to a currently allocated buffer. </param>
		/// <param name="cbSize">Number of bytes to be allocated. </param>
		/// <returns>Returns a pointer to the buffer allocated. 
		/// If the function fails, NULL is returned. </returns>
		//LPVOID WINAPI CryptMemRealloc(LPVOID pv, ULONG cbSize);
		[DllImport("crypt32.dll", EntryPoint="CryptMemRealloc", SetLastError=true)]
		public static extern IntPtr CryptMemRealloc(IntPtr pv, int cbSize);

		private const uint LMEM_FIXED = 0x0000;
		private const uint LMEM_MOVEABLE = 0x0002;
		private const uint LMEM_ZEROINIT = 0x0040;
		private const uint LPTR = (LMEM_FIXED | LMEM_ZEROINIT);

		[DllImport("coredll.dll", EntryPoint="LocalAlloc", SetLastError=true)]
		private static extern IntPtr LocalAllocCe(uint uFlags, int uBytes);
		[DllImport("kernel32.dll", EntryPoint="LocalAlloc", SetLastError=true)]
		private static extern IntPtr LocalAllocXp(uint uFlags, int uBytes);
		private static IntPtr LocalAlloc(uint uFlags, int uBytes)
		{
			if(System.Environment.OSVersion.Platform == PlatformID.WinCE)
				return LocalAllocCe(uFlags, uBytes);
			else
				return LocalAllocXp(uFlags, uBytes);
		}

		[DllImport("coredll.dll", EntryPoint="LocalFree", SetLastError=true)]
		private static extern IntPtr LocalFreeCe(IntPtr hMem);
		[DllImport("kernel32.dll", EntryPoint="LocalFree", SetLastError=true)]
		private static extern IntPtr LocalFreeXp(IntPtr hMem);
		private static IntPtr LocalFree(IntPtr hMem)
		{
			if(System.Environment.OSVersion.Platform == PlatformID.WinCE)
				return LocalFreeCe(hMem);
			else
				return LocalFreeXp(hMem);
		}

		[DllImport("coredll.dll", EntryPoint="LocalReAlloc", SetLastError=true)]
		private static extern IntPtr LocalReAllocCe(IntPtr hMem, uint uBytes, uint fuFlags);
		[DllImport("kernel32.dll", EntryPoint="LocalReAlloc", SetLastError=true)]
		private static extern IntPtr LocalReAllocXp(IntPtr hMem, uint uBytes, uint fuFlags);
		private static IntPtr LocalReAlloc(IntPtr hMem, uint uBytes, uint fuFlags)
		{
			if(System.Environment.OSVersion.Platform == PlatformID.WinCE)
				return LocalReAllocCe(hMem, uBytes, fuFlags);
			else
				return LocalReAllocXp(hMem, uBytes, fuFlags);
		}

		[CLSCompliant(false)]
		public static IntPtr ReAllocHLocal(IntPtr pv, uint cb)
		{
			IntPtr newMem = LocalReAlloc(pv, cb, LMEM_MOVEABLE);
			if(newMem == IntPtr.Zero)
				throw new OutOfMemoryException("unmanaged memory wasnt re-allocated");
			return newMem;
		}

		public static IntPtr AllocHGlobal(int size)
		{
			IntPtr hglobal = LocalAlloc(LPTR, size);
			if(hglobal == IntPtr.Zero)
				throw new OutOfMemoryException("unmanaged memory wasnt allocated");
			return hglobal;
		}

		public static void FreeHGlobal(IntPtr hglobal)
		{
			IntPtr retVal = LocalFree(hglobal);
			if(retVal != IntPtr.Zero)
				throw new Exception("unmanaged memory wasnt freed");
		}
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美极品另类videosde| 欧美性感一区二区三区| 欧美一级在线观看| 天天av天天翘天天综合网色鬼国产| 91丨porny丨蝌蚪视频| 亚洲视频1区2区| 色婷婷综合激情| 午夜精品免费在线| 欧美一区二区网站| 国产一区不卡在线| 国产精品色在线| 在线免费观看视频一区| 日韩电影在线一区二区| 亚洲精品一区二区三区99| 国产激情精品久久久第一区二区 | 成a人片亚洲日本久久| 中文字幕日韩av资源站| 欧美日韩国产一级二级| 精品一区二区三区香蕉蜜桃| 奇米四色…亚洲| 久久久综合精品| 色噜噜狠狠成人中文综合| 婷婷综合另类小说色区| 精品日韩99亚洲| 97精品久久久久中文字幕 | 亚洲欧洲中文日韩久久av乱码| 91社区在线播放| 蜜桃精品在线观看| 国产精品久久久久aaaa| 欧美日韩视频在线第一区| 久久国产乱子精品免费女| 国产精品福利一区| 欧美日韩国产欧美日美国产精品| 久久9热精品视频| 亚洲另类春色校园小说| 日韩一区二区麻豆国产| 成人动漫在线一区| 日韩av电影天堂| 亚洲欧美综合另类在线卡通| 91精品国产综合久久久蜜臀图片| 国产大片一区二区| 日韩成人精品在线观看| 国产精品天天摸av网| 日韩一级视频免费观看在线| 99久久精品免费精品国产| 伦理电影国产精品| 一区二区三区久久久| 久久久久久久国产精品影院| 欧美精选在线播放| 91免费国产在线| 国模套图日韩精品一区二区| 亚洲成人高清在线| 国产精品福利av| 久久亚洲欧美国产精品乐播| 欧美日韩视频在线观看一区二区三区| 国产精品一二二区| 蜜桃视频在线观看一区| 亚洲一区在线视频观看| 国产精品美女一区二区| 久久综合九色综合欧美98| 欧美熟乱第一页| 91啪在线观看| 成人动漫av在线| 国产成人av电影在线播放| 蜜芽一区二区三区| 天天影视网天天综合色在线播放| 亚洲天堂成人网| 中文字幕一区二区三区蜜月 | 欧美另类变人与禽xxxxx| 色婷婷久久久亚洲一区二区三区| 成人高清视频在线| 成人福利在线看| 成人黄色电影在线| 风间由美中文字幕在线看视频国产欧美 | 国产精品白丝jk黑袜喷水| 久久福利视频一区二区| 蜜桃传媒麻豆第一区在线观看| 亚洲成av人片在线| 亚洲成av人片www| 亚洲线精品一区二区三区 | 亚洲一区二区三区中文字幕| 亚洲色图一区二区三区| 亚洲人123区| 一区二区免费在线| 亚洲午夜影视影院在线观看| 亚洲午夜电影在线观看| 午夜影视日本亚洲欧洲精品| 亚洲123区在线观看| 日韩不卡手机在线v区| 蜜桃传媒麻豆第一区在线观看| 蜜桃久久精品一区二区| 黄网站免费久久| 国产mv日韩mv欧美| 91蜜桃网址入口| 欧美日韩一区三区| 日韩小视频在线观看专区| 亚洲精品在线免费播放| 欧美激情一区在线观看| 中文字幕日本乱码精品影院| 亚洲免费视频中文字幕| 亚洲综合一区在线| 秋霞午夜鲁丝一区二区老狼| 美女视频免费一区| 成人av网在线| 在线亚洲精品福利网址导航| 欧美狂野另类xxxxoooo| 精品成人一区二区三区| 国产精品久久久久影院| 亚洲chinese男男1069| 老司机午夜精品| 成人性生交大片免费看中文| 国产精品久久久久久久久免费丝袜 | 国产精品一区二区免费不卡| 粉嫩久久99精品久久久久久夜 | 久久99精品国产91久久来源 | jizz一区二区| 欧美三日本三级三级在线播放| 欧美一区二区视频在线观看2020| 久久久午夜精品| 一区二区视频在线看| 久久精工是国产品牌吗| 成人av在线播放网站| 91精品国产综合久久香蕉麻豆 | 久久99国产精品久久99| 成人动漫中文字幕| 欧美一级片在线观看| 国产精品乱人伦| 青青草精品视频| 成人aaaa免费全部观看| 欧美一区二区三区人| 中文字幕国产一区| 日韩精品午夜视频| 不卡一区在线观看| 日韩欧美国产成人一区二区| 亚洲四区在线观看| 黄网站免费久久| 欧美天堂亚洲电影院在线播放| 久久久噜噜噜久噜久久综合| 亚洲国产综合视频在线观看| 国产福利精品一区二区| 制服视频三区第一页精品| 国产精品电影一区二区三区| 精品一区二区三区在线视频| 欧美专区在线观看一区| 亚洲国产精品成人综合| 另类小说综合欧美亚洲| 欧美在线视频不卡| 综合久久国产九一剧情麻豆| 激情深爱一区二区| 日韩视频在线永久播放| 亚洲夂夂婷婷色拍ww47| 99r国产精品| 中文字幕精品一区二区精品绿巨人| 美腿丝袜在线亚洲一区| 欧美写真视频网站| 亚洲精品国产视频| 成人美女在线视频| 久久久国际精品| 国产又黄又大久久| 日韩欧美国产小视频| 日韩av电影天堂| 欧美一级欧美一级在线播放| 亚洲123区在线观看| 欧美亚洲综合久久| 亚洲一区在线观看网站| 91久久免费观看| 亚洲黄色性网站| 91黄色在线观看| 综合中文字幕亚洲| 91精品91久久久中77777| 自拍偷拍亚洲欧美日韩| 99re热这里只有精品免费视频| 欧美激情资源网| 97精品视频在线观看自产线路二| 一区在线播放视频| 色噜噜久久综合| 亚洲国产另类av| 欧美另类久久久品| 美国毛片一区二区| 久久蜜桃香蕉精品一区二区三区| 久久精品国产精品亚洲红杏| 精品三级在线观看| 国产成人精品免费在线| 国产精品欧美极品| 91成人在线观看喷潮| 亚洲一区二区三区激情| 日韩美女视频一区| 欧洲视频一区二区| 日本中文一区二区三区| 欧美一级在线观看| 国产超碰在线一区| 一区二区三区资源| 欧美精品久久一区| 国产乱码精品一区二区三| 欧美国产日本视频| 欧美性猛交一区二区三区精品| 亚洲成人三级小说| www成人在线观看| 97久久精品人人做人人爽50路 | 欧美手机在线视频|