VS 配置代码片段快捷键

vs2017 code片段快捷键配置
路径:D:\software\VisualStudio2017\path\Common7\IDE\VC\Snippets\2052\Visual C++
后缀名字:.snippet

快捷键:de

驱动代码:DriverEntry

<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
	<CodeSnippet Format="1.0.0">
		<Header>
			<Title>de</Title>
			<Shortcut>de</Shortcut>
			<Description>DriverEntry</Description>
			<Author>Microsoft Corporation</Author>
			<SnippetTypes>
				<SnippetType>Expansion</SnippetType>
				<SnippetType>SurroundsWith</SnippetType>
			</SnippetTypes>
		</Header>
		<Snippet>
			<Declarations>
				<Literal>
					<ID>expression</ID>
					<ToolTip>要计算的表达式</ToolTip>
					<Default>true</Default>
				</Literal>
			</Declarations>
			<Code Language="cpp"><![CDATA[#include<Ntifs.h>
				
				VOID DriverUnload(PDRIVER_OBJECT DriverObject)
				{
					if (DriverObject != NULL)
					{
						DbgPrint("Driver Unload");
					}

					return;
				}

				NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
				{
					DriverObject->DriverUnload = DriverUnload;
					return STATUS_SUCCESS;
				}
			]]>
			</Code>
		</Snippet>
	</CodeSnippet>
</CodeSnippets>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值