Click here to Skip to main content
15,912,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to calculate an array's length? Pin
_AnsHUMAN_ 3-Jul-07 0:28
_AnsHUMAN_ 3-Jul-07 0:28 
AnswerRe: how to calculate an array's length? Pin
Bram van Kampen3-Jul-07 15:23
Bram van Kampen3-Jul-07 15:23 
GeneralRe: how to calculate an array's length? Pin
Peter, Chan3-Jul-07 15:54
Peter, Chan3-Jul-07 15:54 
GeneralRe: how to calculate an array's length? Pin
Hans Dietrich4-Jul-07 1:38
mentorHans Dietrich4-Jul-07 1:38 
QuestionUsing SetWindowRgn on bitmap buttons Pin
mcsherry2-Jul-07 23:52
mcsherry2-Jul-07 23:52 
AnswerRe: Using SetWindowRgn on bitmap buttons Pin
khan++3-Jul-07 0:33
khan++3-Jul-07 0:33 
GeneralRe: Using SetWindowRgn on bitmap buttons Pin
mcsherry3-Jul-07 2:48
mcsherry3-Jul-07 2:48 
QuestionGetting SACL & Privilege Problem Pin
Akin Ocal2-Jul-07 23:44
Akin Ocal2-Jul-07 23:44 
I cant get SACL structure of a file , however i call a function : Privilege(SE_SECURITY_NAME,TRUE);

How can i get sacl ??

BOOL Privilege(LPTSTR pszPrivilege, BOOL bEnable)
{
HANDLE hToken;
TOKEN_PRIVILEGES tp;

//
// obtain the token, first check the thread and then the process
//
if (!OpenThreadToken(GetCurrentThread(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, TRUE, &hToken)){
if (GetLastError() == ERROR_NO_TOKEN){
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
return FALSE;
}
else
return FALSE;
}

//
// get the luid for the privilege
//
if (!LookupPrivilegeValue(NULL, pszPrivilege, &tp.Privileges[0].Luid))
return FALSE;

tp.PrivilegeCount = 1;

if (bEnable)
tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
else
tp.Privileges[0].Attributes = 0;

//
// enable or disable the privilege
//
if (!AdjustTokenPrivileges(hToken, FALSE, &tp, 0, (PTOKEN_PRIVILEGES)NULL, 0))
return FALSE;

if (!CloseHandle(hToken))
return FALSE;

return TRUE;
}
QuestionCleaning up a struct Pin
Programm3r2-Jul-07 23:37
Programm3r2-Jul-07 23:37 
AnswerRe: Cleaning up a struct Pin
MANISH RASTOGI2-Jul-07 23:46
MANISH RASTOGI2-Jul-07 23:46 
QuestionRe: Cleaning up a struct Pin
Programm3r2-Jul-07 23:51
Programm3r2-Jul-07 23:51 
AnswerRe: Cleaning up a struct Pin
MANISH RASTOGI3-Jul-07 0:55
MANISH RASTOGI3-Jul-07 0:55 
GeneralRe: Cleaning up a struct Pin
Programm3r3-Jul-07 0:58
Programm3r3-Jul-07 0:58 
AnswerRe: Cleaning up a struct Pin
Hans Dietrich3-Jul-07 0:12
mentorHans Dietrich3-Jul-07 0:12 
GeneralRe: Cleaning up a struct Pin
Programm3r3-Jul-07 0:13
Programm3r3-Jul-07 0:13 
QuestionIs it possible to modify the systray clock menu? Pin
mid=57412-Jul-07 23:33
mid=57412-Jul-07 23:33 
AnswerRe: Is it possible to modify the systray clock menu? Pin
Perspx3-Jul-07 6:49
Perspx3-Jul-07 6:49 
QuestionRe: Is it possible to modify the systray clock menu? [modified] Pin
mid=57413-Jul-07 15:54
mid=57413-Jul-07 15:54 
AnswerRe: Is it possible to modify the systray clock menu? Pin
Perspx4-Jul-07 6:49
Perspx4-Jul-07 6:49 
QuestionPSID Leakage Problem , please check the code Pin
Akin Ocal2-Jul-07 23:23
Akin Ocal2-Jul-07 23:23 
QuestionRe: PSID Leakage Problem , please check the code Pin
David Crow3-Jul-07 2:51
David Crow3-Jul-07 2:51 
QuestionHow can I modify and protect my exe? Pin
Rationalise2-Jul-07 22:07
Rationalise2-Jul-07 22:07 
AnswerRe: How can I modify and protect my exe? Pin
Hamid_RT2-Jul-07 22:20
Hamid_RT2-Jul-07 22:20 
AnswerRe: How can I modify and protect my exe? Pin
Naveen2-Jul-07 22:45
Naveen2-Jul-07 22:45 
GeneralRe: How can I modify and protect my exe? Pin
led mike3-Jul-07 4:58
led mike3-Jul-07 4:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.