Click here to Skip to main content
15,918,889 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: conversion of date and time to string Pin
CPallini13-Sep-10 23:24
mveCPallini13-Sep-10 23:24 
AnswerRe: conversion of date and time to string Pin
Luc Pattyn14-Sep-10 0:07
sitebuilderLuc Pattyn14-Sep-10 0:07 
AnswerRe: conversion of date and time to string Pin
David Crow14-Sep-10 3:01
David Crow14-Sep-10 3:01 
AnswerRe: conversion of date and time to string Pin
Shivanand Gupta14-Sep-10 5:52
Shivanand Gupta14-Sep-10 5:52 
QuestionAdministrator Privileges Pin
MsmVc13-Sep-10 19:46
MsmVc13-Sep-10 19:46 
AnswerRe: Administrator Privileges Pin
Eugen Podsypalnikov13-Sep-10 20:03
Eugen Podsypalnikov13-Sep-10 20:03 
GeneralRe: Administrator Privileges Pin
MsmVc13-Sep-10 20:07
MsmVc13-Sep-10 20:07 
GeneralRe: Administrator Privileges Pin
MsmVc13-Sep-10 20:13
MsmVc13-Sep-10 20:13 
Hey i use code which is given in MSDN.I use like this
bool CCheckApp::IsUserAdmin(void)
{
	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)) 
    {
		AfxMessageBox("Test");
         b = FALSE;
    } 
    FreeSid(AdministratorsGroup); 
}

return(b);

}
And call in
BOOL CCheckApp::InitInstance()
{
...

..
..
IsUserAdmin();

}


i am wrong or right.Please help me
GeneralRe: Administrator Privileges Pin
Eugen Podsypalnikov13-Sep-10 20:21
Eugen Podsypalnikov13-Sep-10 20:21 
GeneralRe: Administrator Privileges Pin
MsmVc13-Sep-10 20:25
MsmVc13-Sep-10 20:25 
GeneralRe: Administrator Privileges Pin
Eugen Podsypalnikov13-Sep-10 20:26
Eugen Podsypalnikov13-Sep-10 20:26 
QuestionHow can find 2nd sat of month? Pin
Le@rner13-Sep-10 19:37
Le@rner13-Sep-10 19:37 
AnswerRe: How can find 2nd sat of month? Pin
Eugen Podsypalnikov13-Sep-10 20:11
Eugen Podsypalnikov13-Sep-10 20:11 
GeneralRe: How can find 2nd sat of month? Pin
CPallini13-Sep-10 22:59
mveCPallini13-Sep-10 22:59 
GeneralRe: How can find 2nd sat of month? Pin
Eugen Podsypalnikov13-Sep-10 23:23
Eugen Podsypalnikov13-Sep-10 23:23 
AnswerRe: How can find 2nd sat of month? PinPopular
CPallini13-Sep-10 22:58
mveCPallini13-Sep-10 22:58 
QuestionPointer Pointing to Itself? Pin
Skippums13-Sep-10 14:45
Skippums13-Sep-10 14:45 
AnswerRe: Pointer Pointing to Itself? Pin
Peter_in_278013-Sep-10 19:13
professionalPeter_in_278013-Sep-10 19:13 
AnswerRe: Pointer Pointing to Itself? Pin
Aescleal13-Sep-10 23:30
Aescleal13-Sep-10 23:30 
GeneralRe: Pointer Pointing to Itself? Pin
Skippums14-Sep-10 3:46
Skippums14-Sep-10 3:46 
GeneralRe: Pointer Pointing to Itself? Pin
Aescleal14-Sep-10 3:57
Aescleal14-Sep-10 3:57 
QuestionSending HTTP Post via TCP/IP Pin
Dustin Henry13-Sep-10 11:15
Dustin Henry13-Sep-10 11:15 
AnswerRe: Sending HTTP Post via TCP/IP Pin
Dustin Henry13-Sep-10 11:37
Dustin Henry13-Sep-10 11:37 
GeneralRe: Sending HTTP Post via TCP/IP Pin
Moak14-Sep-10 0:32
Moak14-Sep-10 0:32 
AnswerRe: Sending HTTP Post via TCP/IP Pin
markkuk13-Sep-10 11:52
markkuk13-Sep-10 11:52 

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.