09 2016 档案

摘要:演示如何读写文本数据 演示如何读写二进制数据 演示如何读写流数据 演示如何读写“最近访问列表”和“未来访问列表” 1、演示如何读写文本数据 <StackPanel Margin="0,50 "> <Button Name="btnWriteText" Content="Text方式写入文件" Cli 阅读全文
posted @ 2016-09-29 17:51 ansen312 阅读(343) 评论(0) 推荐(0)
摘要:/* * 用于实现 IRandomAccessStream, IBuffer, Stream, byte[] 之间相互转换的帮助类 */ using System;using System.IO;using System.Runtime.InteropServices.WindowsRuntime; 阅读全文
posted @ 2016-09-29 14:28 ansen312 阅读(3030) 评论(0) 推荐(0)
摘要:演示如何获取文件的缩略图 FileSystem/ThumbnailAccess.xaml FileSystem/ThumbnailAccess.xaml.cs 4、演示如何通过 AQS - Advanced Query Syntax 搜索本地文件 FileSystem/AQS.xaml.cs 阅读全文
posted @ 2016-09-29 10:56 ansen312 阅读(543) 评论(0) 推荐(0)
摘要:Win10的开发经常需要进行文件的操作,因此文件的选择对话框FileOpenPicker、文件保存对话框FileSavePicker以及文件夹选择对话框FolderPicker十分重要。这三者的操作也比较简单。但有一些小细节可能许多人没注意到,听我慢慢道来,精彩留在后面。 三个对话框的操作在MSDN 阅读全文
posted @ 2016-09-28 18:30 ansen312 阅读(584) 评论(0) 推荐(0)
摘要:Image - 图片控件 MediaElement - 播放视频或音频的控件 示例1、Image 的 DemoImageDemo.xaml ImageDemo.xaml.cs 2、MediaElement 的 DemoMediaElementDemo.xaml MediaElementDemo.xa 阅读全文
posted @ 2016-09-28 16:04 ansen312 阅读(293) 评论(0) 推荐(0)
摘要:<Grid> <FlipView> <FlipView.Items> <FlipViewItem> <Grid> <Image Stretch="Fill" Source="/image/IMG_4.png" Margin="0,-1,0,1"></Image> <!--<TextBox x:Nam 阅读全文
posted @ 2016-09-28 11:38 ansen312 阅读(276) 评论(0) 推荐(0)
摘要:1、C# 6.0 示例 1: 自动属性支持初始化, 字符串嵌入的新方式, 通过 Using Static 引用静态类, nameof 表达式CSharp6/Demo1.xaml.cs 2、C# 6.0 示例 2: 在 catch 和 finally 中支持 await, 异常过滤器CSharp6/D 阅读全文
posted @ 2016-09-27 17:05 ansen312 阅读(189) 评论(0) 推荐(0)
摘要:UI 设计概述 启动屏幕(闪屏) 屏幕方向 示例1、UI 设计概述UI/Summary.xaml 2、启动屏幕(闪屏)UI/MySplashScreen.xaml UI/MySplashScreen.xaml.cs 3、屏幕方向UI/ScreenOrientation.xaml UI/ScreenO 阅读全文
posted @ 2016-09-27 17:02 ansen312 阅读(268) 评论(0) 推荐(0)
摘要:窗口全屏 窗口尺寸 示例1、窗口全屏UI/FullScreen.xaml UI/FullScreen.xaml.cs 2、窗口尺寸UI/ScreenSize.xaml UI/ScreenSize.xaml.cs 阅读全文
posted @ 2016-09-27 17:00 ansen312 阅读(419) 评论(0) 推荐(0)
摘要:1、自定义帮助类,用于简化 SecondaryView 的管理UI/MultipleViews/SecondaryViewHelper.cs 2、扩展 Application 对象,定义一些需要用到的全局变量UI/MultipleViews/AppPartial.cs 3、用于演示 Secondar 阅读全文
posted @ 2016-09-27 16:59 ansen312 阅读(259) 评论(0) 推荐(0)
摘要:TitleBarDemo.xaml TitleBarDemo.xaml.cs 阅读全文
posted @ 2016-09-27 16:58 ansen312 阅读(318) 评论(0) 推荐(0)
摘要:字体的自动继承的特性 Style 样式 ControlTemplate 控件模板 示例1、演示字体的自动继承的特性Controls/UI/FontInherit.xaml 2、演示“Style”相关知识点Controls/UI/Style.xaml Controls/UI/Style.xaml.cs 阅读全文
posted @ 2016-09-27 16:57 ansen312 阅读(255) 评论(0) 推荐(0)
摘要:资源限定符概述 资源限定符示例 示例1、资源限定符概述Resource/Qualifiers/Summary.xaml Resource/Qualifiers/Summary.xaml.cs 2、资源限定符示例Resource/Qualifiers/Demo.xaml Resource/Qualif 阅读全文
posted @ 2016-09-27 16:56 ansen312 阅读(266) 评论(0) 推荐(0)
摘要:VisualState 之 StateTrigger 示例1、自定义 StateTriggerControls/UI/VisualState/MyDeviceFamilyStateTrigger.cs 2、自定义 StateTriggerControls/UI/VisualState/MyInput 阅读全文
posted @ 2016-09-27 16:56 ansen312 阅读(214) 评论(0) 推荐(0)
摘要:VisualState 和 VisualStateManager 控件的默认 Style, ControlTemplate, VisualState 示例1、演示“VisualState 和 VisualStateManager”相关知识点Controls/UI/VisualState/Visual 阅读全文
posted @ 2016-09-27 16:56 ansen312 阅读(442) 评论(0) 推荐(0)
摘要:StaticResource ThemeResource 示例1、演示“StaticResource”相关知识点Resource/StaticResourceDemo.xaml Resource/StaticResourceDemo.xaml.cs 2、演示“ThemeResource”相关知识点R 阅读全文
posted @ 2016-09-27 16:55 ansen312 阅读(363) 评论(0) 推荐(0)
摘要:CustomResource ResourceDictionary 加载外部的 ResourceDictionary 文件 示例1、演示“CustomResource”相关知识点Resource/CustomResourceTest.cs Resource/CustomResourceDemo.xa 阅读全文
posted @ 2016-09-27 16:54 ansen312 阅读(722) 评论(0) 推荐(0)
摘要:Stroke - 笔划 Brush - 画笔 示例1、演示“Stroke”相关知识点Drawing/Stroke.xaml 2、演示“Brush”相关知识点Drawing/Brush.xaml Drawing/Brush.xaml.cs 阅读全文
posted @ 2016-09-27 16:53 ansen312 阅读(267) 评论(0) 推荐(0)
摘要:Shape - 图形 Path - 路径 示例1、演示“Shape”相关知识点Drawing/Shape.xaml 2、演示“Path”相关知识点Drawing/Path.xaml 阅读全文
posted @ 2016-09-27 16:53 ansen312 阅读(419) 评论(0) 推荐(0)
摘要:线性动画 - ColorAnimation, DoubleAnimation, PointAnimation 关键帧动画 - ColorAnimationUsingKeyFrames, DoubleAnimationUsingKeyFrames, PointAnimationUsingKeyFram 阅读全文
posted @ 2016-09-27 16:52 ansen312 阅读(613) 评论(0) 推荐(0)
摘要:背水一战 Windows 10 之 动画 PopInThemeAnimation - 控件出现时的动画 PopOutThemeAnimation - 控件消失时的动画 FadeInThemeAnimation - 控件淡入的动画 FadeOutThemeAnimation - 控件淡出的动画 Poi 阅读全文
posted @ 2016-09-27 16:51 ansen312 阅读(711) 评论(0) 推荐(0)
摘要:演示缓动(easing)的应用Animation/EasingAnimation.xaml Animation/EasingAnimation.xaml.cs 阅读全文
posted @ 2016-09-27 16:51 ansen312 阅读(255) 评论(0) 推荐(0)
摘要:介绍背水一战 Windows 10 之 绑定 与 Element 绑定 与 Indexer 绑定 TargetNullValue - 当绑定数据为 null 时显示的值 FallbackValue - 当绑定失败时显示的值 示例1、演示如何与 Element 绑定Bind/BindingElemen 阅读全文
posted @ 2016-09-27 16:47 ansen312 阅读(238) 评论(0) 推荐(0)
摘要:介绍背水一战 Windows 10 之 动画 ThemeTransition 的概述 EntranceThemeTransition - 页面间跳转时的过渡效果 ContentThemeTransition - 内容改变时的过渡效果 RepositionThemeTransition - 位置改变时 阅读全文
posted @ 2016-09-27 16:47 ansen312 阅读(221) 评论(0) 推荐(0)
摘要:介绍背水一战 Windows 10 之 绑定 TemplateBinding 绑定 与 RelativeSource 绑定 与 StaticResource 绑定 示例1、演示 TemplateBinding 的用法Bind/TemplateBindingDemo.xaml 2、演示 Binding 阅读全文
posted @ 2016-09-27 16:46 ansen312 阅读(524) 评论(0) 推荐(0)
摘要:介绍背水一战 Windows 10 之 绑定 DataContextChanged - FrameworkElement 的 DataContext 发生变化时触发的事件 UpdateSourceTrigger - 数据更新的触发方式 对绑定的数据做自定义转换 示例1、演示 DataContextC 阅读全文
posted @ 2016-09-27 16:45 ansen312 阅读(682) 评论(0) 推荐(0)
摘要:背水一战 Windows 10 之 绑定 x:Bind 绑定 x:Bind 绑定之 x:Phase 使用绑定过程中的一些技巧 示例1、演示 x:Bind 绑定的相关知识点Bind/BindDemo.xaml Bind/BindDemo.xaml.cs 2、演示 x:Bind 绑定之 x:Phase 阅读全文
posted @ 2016-09-27 16:44 ansen312 阅读(462) 评论(0) 推荐(0)
摘要:背水一战 Windows 10 之 绑定 通过 Binding 绑定对象 通过 x:Bind 绑定对象 通过 Binding 绑定集合 通过 x:Bind 绑定集合 示例1、演示如何通过 Binding 绑定对象Bind/BindingModel.xaml Bind/BindingModel.xam 阅读全文
posted @ 2016-09-27 16:43 ansen312 阅读(524) 评论(0) 推荐(0)
摘要:介绍背水一战 Windows 10 之 MVVM(Model-View-ViewModel) 通过 Binding 或 x:Bind 结合 Command 实现,通过 ButtonBase 触发命令 示例1、ModelMVVM/Model/Product.cs MVVM/Model/ProductD 阅读全文
posted @ 2016-09-27 16:41 ansen312 阅读(341) 评论(0) 推荐(0)
摘要:介绍背水一战 Windows 10 之 MVVM(Model-View-ViewModel) 通过 Binding 或 x:Bind 结合 Command 实现,通过非 ButtonBase 触发命令 示例1、ModelMVVM/Model/Product.cs MVVM/Model/Product 阅读全文
posted @ 2016-09-27 16:40 ansen312 阅读(195) 评论(0) 推荐(0)
摘要:背水一战 Windows 10 之 MVVM(Model-View-ViewModel) 通过 x:Bind 实现 MVVM(不用 Command) 示例1、ModelMVVM/Model/Product.cs MVVM/Model/ProductDatabase.cs 2、ViewModelMVV 阅读全文
posted @ 2016-09-27 16:39 ansen312 阅读(370) 评论(0) 推荐(0)
摘要:x:DeferLoadStrategy="Lazy" - 用于指定一个 UIElement 为一个延迟加载元素 x:Null - null 示例1、x:DeferLoadStrategy 通过 FindName 加载Xaml/DeferLoadStrategy/Demo1.xaml Xaml/Def 阅读全文
posted @ 2016-09-27 16:38 ansen312 阅读(283) 评论(0) 推荐(0)
摘要:介绍背水一战 Windows 10 之 控件(文本类) TextBox PasswordBox 示例1、TextBox 的示例 1Controls/TextControl/TextBoxDemo1.xaml Controls/TextControl/TextBoxDemo1.xaml.cs 2、Te 阅读全文
posted @ 2016-09-27 16:37 ansen312 阅读(569) 评论(0) 推荐(0)
摘要:1、TextBlock 的示例 1Controls/TextControl/TextBlockDemo1.xaml Controls/TextControl/TextBlockDemo1.xaml.cs 2、TextBlock 的示例 2Controls/TextControl/TextBlockD 阅读全文
posted @ 2016-09-27 16:37 ansen312 阅读(430) 评论(0) 推荐(0)
摘要:Controls/TextControl/AutoSuggestBoxDemo.xaml Controls/TextControl/AutoSuggestBoxDemo.xaml.cs 阅读全文
posted @ 2016-09-27 16:36 ansen312 阅读(379) 评论(0) 推荐(0)
摘要:介绍背水一战 Windows 10 之 控件(文本类) RichTextBlock RichTextBlockOverflow RichEditBox 示例1、RichTextBlock 的示例Controls/TextControl/RichTextBlockDemo.xaml Controls/ 阅读全文
posted @ 2016-09-27 16:36 ansen312 阅读(375) 评论(0) 推荐(0)
摘要:1、Selector(基类) 的示例Controls/SelectionControl/SelectorDemo.xaml Controls/SelectionControl/SelectorDemo.xaml.cs 2、ComboBox 的示例Controls/SelectionControl/C 阅读全文
posted @ 2016-09-27 16:35 ansen312 阅读(292) 评论(0) 推荐(0)
摘要:介绍背水一战 Windows 10 之 控件(按钮类) ButtonBase Button HyperlinkButton RepeatButton ToggleButton AppBarButton AppBarToggleButton 示例1、ButtonBase(基类) 的示例Controls 阅读全文
posted @ 2016-09-27 16:35 ansen312 阅读(483) 评论(0) 推荐(0)
摘要:1、RangeBase(基类) 的示例Controls/ProgressControl/RangeBaseDemo.xaml Controls/ProgressControl/RangeBaseDemo.xaml.cs 2、Slider 的示例Controls/ProgressControl/Sli 阅读全文
posted @ 2016-09-27 16:34 ansen312 阅读(252) 评论(0) 推荐(0)
摘要:1、ListBox 的示例Controls/SelectionControl/ListBoxDemo.xaml Controls/SelectionControl/ListBoxDemo.xaml.cs 2、RadioButton 的示例Controls/SelectionControl/Radio 阅读全文
posted @ 2016-09-27 16:34 ansen312 阅读(228) 评论(0) 推荐(0)
摘要:1、FlyoutBase(基类) 的示例Controls/FlyoutControl/FlyoutBaseDemo.xaml Controls/FlyoutControl/FlyoutBaseDemo.xaml.cs 2、Flyout 的示例Controls/FlyoutControl/Flyout 阅读全文
posted @ 2016-09-27 16:33 ansen312 阅读(1722) 评论(1) 推荐(0)
摘要:示例1、ToolTip 的示例Controls/FlyoutControl/ToolTipDemo.xaml Controls/FlyoutControl/ToolTipDemo.xaml.cs 2、Popup 的示例Controls/FlyoutControl/PopupDemo.xaml Con 阅读全文
posted @ 2016-09-27 16:31 ansen312 阅读(426) 评论(0) 推荐(0)
摘要:一、前言 大量的系统安全问题是由于薄弱的缓冲处理以及由此产生的缓冲区溢出造成的,而薄弱的缓冲区处理常常与字符串操作相关。c/c++语言运行库提供的标准字符串操作函数(strcpy, strcat, sprintf等)不能阻止在超出字符串尾端的写入。 基于Windows XP SP1以及随后的操作系统 阅读全文
posted @ 2016-09-12 17:58 ansen312 阅读(330) 评论(0) 推荐(0)
摘要:Windows规定有些虚拟内存可以交换到文件中,这类内存被称为分页内存 有些虚拟内存 永远不会交换到文件中,这些内存叫非分页内存 #define PAGEDCODE code_seg(“PAGE”);//分页内存 #define LOCKEDCODE code_seg();//非分页的 #defin 阅读全文
posted @ 2016-09-12 17:51 ansen312 阅读(1158) 评论(0) 推荐(0)
摘要:1.文件的创建 对文件的创建或者打开都是通过内核函数ZwCreateFile实现的。和Windows API类似,这个内核函数返回一个文件句柄,文件的所有操作都是依靠这个句柄进行操作的。在文件操作完毕后,要关闭这个文件句柄。 NTSTATUS ZwCreateFile( OUT PHANDLE Fi 阅读全文
posted @ 2016-09-12 16:42 ansen312 阅读(1221) 评论(0) 推荐(0)
摘要:注册表操作 注册表里的几个概念: 1. 创建关闭注册表项 NTSTATUS ZwCreateKey( OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, //访问权限,一般为KEY_ALL_ACCLESS IN POBJECT_ATTRIBUTE 阅读全文
posted @ 2016-09-12 16:37 ansen312 阅读(1306) 评论(0) 推荐(0)
摘要:强制重启N种方法 2015-12-24 17:19 146人阅读 评论(0) 收藏 举报 2015-12-24 17:19 146人阅读 评论(0) 收藏 举报 本文章已收录于: 分类: 驱动开发学习(458) 作者同类文章X 分类: 驱动开发学习(458) 作者同类文章X 作者同类文章X 作者同类 阅读全文
posted @ 2016-09-12 16:30 ansen312 阅读(993) 评论(0) 推荐(0)
摘要:一般两种方法使用/设置定时器,一种是使用I/O定时器例程,一种是使用DPC例程。1、定时器的实现1)使用I/O定时器例程NTSTATUSIoInitializeTimer(IN PDEVICE_OBJECT DeviceObject,IN PIO_TIMER_ROUTINE TimerRoutine 阅读全文
posted @ 2016-09-12 14:23 ansen312 阅读(1807) 评论(0) 推荐(0)