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>