Click here to Skip to main content
15,882,705 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to force to kill the specific progress on Win7 X64 Ultimate? Pin
Tox1k10-Apr-12 15:09
Tox1k10-Apr-12 15:09 
GeneralRe: How to force to kill the specific progress on Win7 X64 Ultimate? Pin
Falconapollo10-Apr-12 22:41
Falconapollo10-Apr-12 22:41 
AnswerRe: How to force to kill the specific progress on Win7 X64 Ultimate? Pin
ThatsAlok10-Apr-12 22:23
ThatsAlok10-Apr-12 22:23 
GeneralRe: How to force to kill the specific progress on Win7 X64 Ultimate? Pin
Falconapollo10-Apr-12 22:39
Falconapollo10-Apr-12 22:39 
AnswerRe: How to force to kill the specific progress on Win7 X64 Ultimate? Pin
Randor 11-Apr-12 4:26
professional Randor 11-Apr-12 4:26 
GeneralRe: How to force to kill the specific progress on Win7 X64 Ultimate? Pin
Falconapollo11-Apr-12 4:34
Falconapollo11-Apr-12 4:34 
GeneralRe: How to force to kill the specific progress on Win7 X64 Ultimate? Pin
Nelek12-Apr-12 12:59
protectorNelek12-Apr-12 12:59 
QuestionIsUserAdmin returns false when UAC is enabaled in VS2010 Pin
V K 29-Apr-12 20:46
V K 29-Apr-12 20:46 
The following piece of code was working fine in VC++6.0 . When UAC was enabled/disabled , for an administrative user the IsUserAdmin was returning true. We are migrating VC++6.0 to VS2010. After this when UAC is enabled IsUserAdmin is returning false and when UAC is disabled IsUserAdmin is returning true. Why is this failing in VS2010 when UAC is enabled and what could be fix for this.

BOOL IsUserAdmin(VOID)
/*++
Routine Description: This routine returns TRUE if the caller's
process is a member of the Administrators local group. Caller is NOT
expected to be impersonating anyone and is expected to be able to
open its own process and process token.
Arguments: None.
Return Value:
TRUE - Caller has Administrators local group.
FALSE - Caller does not have Administrators local group. --
*/
{
BOOL b;
SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
PSID AdministratorsGroup;
b = AllocateAndInitializeSid(
&NtAuthority,
2,
SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_ADMINS,
0, 0, 0, 0, 0, 0,
&AdministratorsGroup);
if(b)
{
if (!CheckTokenMembership( NULL, AdministratorsGroup, &b))
{
b = FALSE;
}
FreeSid(AdministratorsGroup);
}

return(b);
}

Thanks in advance
AnswerRe: IsUserAdmin returns false when UAC is enabaled in VS2010 Pin
Jochen Arndt9-Apr-12 21:12
professionalJochen Arndt9-Apr-12 21:12 
AnswerRe: IsUserAdmin returns false when UAC is enabaled in VS2010 Pin
jkirkerx11-Apr-12 11:54
professionaljkirkerx11-Apr-12 11:54 
Questionhow to achieve the effect like vmware?? Pin
Jing_K9-Apr-12 19:21
Jing_K9-Apr-12 19:21 
AnswerRe: how to achieve the effect like vmware?? Pin
Richard MacCutchan9-Apr-12 21:07
mveRichard MacCutchan9-Apr-12 21:07 
GeneralRe: how to achieve the effect like vmware?? Pin
ThatsAlok10-Apr-12 22:24
ThatsAlok10-Apr-12 22:24 
GeneralRe: how to achieve the effect like vmware?? Pin
Richard MacCutchan11-Apr-12 0:01
mveRichard MacCutchan11-Apr-12 0:01 
Questionsyntax errors? Pin
connect2janu9-Apr-12 13:46
connect2janu9-Apr-12 13:46 
AnswerRe: syntax errors? Pin
David Crow9-Apr-12 17:22
David Crow9-Apr-12 17:22 
AnswerRe: syntax errors? Pin
Malli_S9-Apr-12 18:47
Malli_S9-Apr-12 18:47 
QuestionThe questions we get these days! PinPopular
Erudite_Eric9-Apr-12 6:45
Erudite_Eric9-Apr-12 6:45 
AnswerRe: The questions we get these days! Pin
Chuck O'Toole9-Apr-12 7:59
Chuck O'Toole9-Apr-12 7:59 
GeneralRe: The questions we get these days! Pin
Richard MacCutchan9-Apr-12 8:05
mveRichard MacCutchan9-Apr-12 8:05 
AnswerRe: The questions we get these days! Pin
Chuck O'Toole9-Apr-12 8:10
Chuck O'Toole9-Apr-12 8:10 
GeneralRe: The questions we get these days! Pin
PJ Arends9-Apr-12 9:44
professionalPJ Arends9-Apr-12 9:44 
GeneralRe: The questions we get these days! Pin
jeron110-Apr-12 4:02
jeron110-Apr-12 4:02 
GeneralRe: The questions we get these days! Pin
Arthur F Souza10-Apr-12 9:12
Arthur F Souza10-Apr-12 9:12 
GeneralRe: The questions we get these days! Pin
David Crow10-Apr-12 9:28
David Crow10-Apr-12 9:28 

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.