Вниз
Скачать: CL | DM;

Privileges !!!   Найти похожие ветки 

 
Nigma ©   (2002-01-12 13:30) [0]

Podskazhite pozhalujsta, kak pravil"no rabotat" s privilegiyami v Delphi5 (obyavleniya i t.d ), a to u mneya stoit WinXP, a emu kak i WinNT nuzhni privilegii.
Zaranee spasibo !!!


 
VuDZ ©   (2002-01-22 19:12) [1]

пояснения нужны?

// =========== seting priveges ==================
HANDLE hToken; // handle to process token
TOKEN_PRIVILEGES tkp; // pointer to token structure

// Get the current process token handle
if (!OpenProcessToken(GetCurrentProcess(),
TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
{
CErrCodeMsg er(GetLastError());
AfxMessageBox(er.GetString());
}

// Get the LUID for access to DACL

LookupPrivilegeValue(NULL, SE_SECURITY_NAME, &tkp.Privileges[0].Luid);

tkp.PrivilegeCount = 1; // one privilege to set
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;

// Get needent privileges
if (!AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES) NULL, 0))
{
CErrCodeMsg er(GetLastError());
AfxMessageBox(er.GetString());
}



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.007 c
1-66901
lipskiy
2002-03-06 02:11
2002.03.21
OpenDialog перестал реагировать на InitialDir !!! Помогите разобраться с глюком.


14-66980
Yuri Btr
2002-02-07 10:39
2002.03.21
Знатоки Clipperа!!!


3-66732
Лёша
2002-02-18 04:47
2002.03.21
Нужна литература по InterBase.


1-66871
evgen_2001
2002-03-05 16:53
2002.03.21
Передача файла по сокет-каналу.


4-67050
DNT
2001-12-30 20:43
2002.03.21
Как определить handle активного окна?




   Наверх