Click here to Skip to main content
15,897,519 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeNope. Pin
CPallini7-Jul-08 23:40
mveCPallini7-Jul-08 23:40 
GeneralRe: Nope. Pin
Rajesh R Subramanian7-Jul-08 23:48
professionalRajesh R Subramanian7-Jul-08 23:48 
JokeRe: Nope. Pin
CPallini7-Jul-08 23:56
mveCPallini7-Jul-08 23:56 
JokeI'm thinking of authoring a book. I was just wondering if you'd join me Pin
Rajesh R Subramanian8-Jul-08 0:01
professionalRajesh R Subramanian8-Jul-08 0:01 
GeneralSure. Pin
CPallini8-Jul-08 0:13
mveCPallini8-Jul-08 0:13 
AnswerRe: Writing to Registry Pin
_AnsHUMAN_ 7-Jul-08 23:05
_AnsHUMAN_ 7-Jul-08 23:05 
GeneralRe: Writing to Registry Pin
V K 27-Jul-08 23:49
V K 27-Jul-08 23:49 
GeneralRe: Writing to Registry Pin
_AnsHUMAN_ 8-Jul-08 0:06
_AnsHUMAN_ 8-Jul-08 0:06 
Here is the code for IsUserAdmin
<code>
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); 
}
</code>

<div class="ForumSig">Somethings seem HARD to do, until we know how to do them.
;-)_AnShUmAn_
</div>

GeneralRe: Writing to Registry Pin
V K 28-Jul-08 0:14
V K 28-Jul-08 0:14 
GeneralRe: Writing to Registry Pin
_AnsHUMAN_ 8-Jul-08 1:00
_AnsHUMAN_ 8-Jul-08 1:00 
AnswerRe: Writing to Registry Pin
halibobo8-Jul-08 16:27
halibobo8-Jul-08 16:27 
QuestionHow can i retrieve the information shown in Local area connection status Pin
vicky000007-Jul-08 22:33
vicky000007-Jul-08 22:33 
AnswerRe: How can i retrieve the information shown in Local area connection status Pin
David Crow8-Jul-08 2:57
David Crow8-Jul-08 2:57 
QuestionUP and DOWN keyboard event in MFC Application(Very Urgent) Pin
AnithaSubramani7-Jul-08 22:31
AnithaSubramani7-Jul-08 22:31 
AnswerRe: UP and DOWN keyboard event in MFC Application(Very Urgent) Pin
vicky000007-Jul-08 22:48
vicky000007-Jul-08 22:48 
GeneralRe: UP and DOWN keyboard event in MFC Application(Very Urgent) Pin
AnithaSubramani7-Jul-08 23:08
AnithaSubramani7-Jul-08 23:08 
GeneralRe: UP and DOWN keyboard event in MFC Application(Very Urgent) Pin
vicky000007-Jul-08 23:37
vicky000007-Jul-08 23:37 
AnswerRe: UP and DOWN keyboard event in MFC Application(Very Urgent) Pin
_AnsHUMAN_ 7-Jul-08 22:50
_AnsHUMAN_ 7-Jul-08 22:50 
GeneralRe: UP and DOWN keyboard event in MFC Application(Very Urgent) Pin
AnithaSubramani7-Jul-08 23:13
AnithaSubramani7-Jul-08 23:13 
AnswerRe: UP and DOWN keyboard event in MFC Application(Very Urgent) Pin
CPallini7-Jul-08 23:29
mveCPallini7-Jul-08 23:29 
AnswerRe: UP and DOWN keyboard event in MFC Application(Very Urgent) Pin
David Crow8-Jul-08 3:12
David Crow8-Jul-08 3:12 
JokeRe: UP and DOWN keyboard event in MFC Application(Very Urgent) Pin
Mark Salsbery8-Jul-08 6:43
Mark Salsbery8-Jul-08 6:43 
AnswerRe: UP and DOWN keyboard event in MFC Application(Very Urgent) Pin
Stephen Hewitt8-Jul-08 15:03
Stephen Hewitt8-Jul-08 15:03 
Questiondialog help Pin
projectip7-Jul-08 22:08
projectip7-Jul-08 22:08 
AnswerRe: dialog help Pin
_AnsHUMAN_ 7-Jul-08 22:22
_AnsHUMAN_ 7-Jul-08 22:22 

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.