Notice
Recent Posts
Recent Comments
목록MFC 11
LuvSea
[MFC] 프로세스 접근 권한 얻어오기
프로세스에 대한 정보를 읽어오는데 보호된 프로세스라서 읽어오지 못하는 경우가 있다. 그럴 경우에는 아래의 함수를 추가해주면 된다. BOOL SetPrivilege(HANDLE hToken,LPCTSTR Privilege, BOOL bEnablePrivilege) { TOKEN_PRIVILEGES tp; LUID luid; TOKEN_PRIVILEGES tpPrevious; DWORD cbPrevious =sizeof(TOKEN_PRIVILEGES); if(FALSE == LookupPrivilegeValue( NULL, Privilege, &luid )) { return FALSE; } tp.PrivilegeCount = 1; tp.Privileges[0].Luid = luid; tp.Privileges..
sTudy
2009. 10. 8. 14:03