RoleTypeCorrectlyUsed (Windows 驱动程序 CodeQL 查询)

概述

应使用函数角色类型声明驱动程序入口点函数。

有关详细信息,请参阅 C28158 警告 - Windows 驱动程序

建议

请确保所使用的函数的角色类型与预期的角色类型匹配。

示例

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

//Macros to enable or disable a code section that may or may not conflict with this test.
#define SET_DISPATCH 1

//Template function. Not used for this test.
void top_level_call(){
}

其他详细信息

可在 Microsoft GitHub CodeQL 存储库中找到此查询。 有关 Windows 驱动程序开发人员如何下载和运行 CodeQL 的详细信息,请参阅 CodeQL 和静态工具徽标测试页。