728x90
반응형
728x170
■ GetKernelObjectSecurity API 함수를 선언하는 방법을 보여준다.
▶ 예제 코드 (C#)
using System;
using System.Runtime.InteropServices;
#region 커널 객체 보안 구하기 - GetKernelObjectSecurity(handle, securityInformation, securityDescriptor, length, lengthNeeded)
/// <summary>
/// 커널 객체 보안 구하기
/// </summary>
/// <param name="handle">커널 객체 핸들</param>
/// <param name="securityInformation">보안 정보</param>
/// <param name="securityDescriptor">보안 설명자</param>
/// <param name="length">길이</param>
/// <param name="lengthNeeded">필요 길이</param>
/// <returns>처리 결과</returns>
[DllImport("advapi32", SetLastError = true)]
private static extern bool GetKernelObjectSecurity
(
IntPtr handle,
int securityInformation,
[Out] byte[] securityDescriptor,
uint length,
out uint lengthNeeded
);
#endregion
728x90
반응형
그리드형(광고전용)
'C# > WIN32' 카테고리의 다른 글
[C#/WIN32] GetCursorPos API 함수 선언하기 (0) | 2021.05.31 |
---|---|
[C#/WIN32] GetDiskFreeSpaceEx API 함수 선언하기 (0) | 2021.05.30 |
[C#/WIN32] FormatMessage API 함수 선언하기 (0) | 2021.05.26 |
[C#/WIN32] RtlSetProcessIsCritical API 함수 선언하기 (0) | 2021.05.25 |
[C#/WIN32] SetKernelObjectSecurity API 함수 선언하기 (0) | 2021.05.25 |
[C#/WIN32] SetThreadExecutionState API 함수 선언하기 (0) | 2021.05.25 |
[C#/WIN32] SetWindowDisplayAffinity API 함수 선언하기 (0) | 2021.05.25 |
[C#/WIN32] GetWindowLong API 함수 선언하기 (0) | 2021.05.25 |
[C#/WIN32] DwmGetWindowAttribute API 함수 선언하기 (0) | 2021.05.25 |
[C#/WIN32] SetThreadToken API 함수 선언하기 (0) | 2021.05.14 |
댓글을 달아 주세요