다음을 통해 공유


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 및 정적 도구 로고 테스트 페이지를 참조하세요.