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

C / C++ / MFC

 
GeneralRe: Reg: System Login detail Pin
Rajesh R Subramanian11-Jun-08 23:04
professionalRajesh R Subramanian11-Jun-08 23:04 
GeneralRe: Reg: System Login detail Pin
pooja_friends11-Jun-08 23:13
pooja_friends11-Jun-08 23:13 
GeneralRe: Reg: System Login detail Pin
Rajesh R Subramanian11-Jun-08 23:20
professionalRajesh R Subramanian11-Jun-08 23:20 
GeneralRe: Reg: System Login detail Pin
pooja_friends11-Jun-08 23:31
pooja_friends11-Jun-08 23:31 
GeneralRe: Reg: System Login detail Pin
Rajesh R Subramanian12-Jun-08 0:00
professionalRajesh R Subramanian12-Jun-08 0:00 
AnswerRe: Reg: System Login detail Pin
Jagdish V. Bhimbha11-Jun-08 23:09
Jagdish V. Bhimbha11-Jun-08 23:09 
GeneralRe: Reg: System Login detail Pin
pooja_friends11-Jun-08 23:47
pooja_friends11-Jun-08 23:47 
GeneralRe: Reg: System Login detail Pin
Jagdish V. Bhimbha12-Jun-08 0:02
Jagdish V. Bhimbha12-Jun-08 0:02 
Hello...

The function CheckTokenMembership() requires following things :

Header : Declared in Winbase.h; include Windows.h.
Library : Use Advapi32.lib.
DLL : Requires Advapi32.dll

Check by including this header file.


Next solution is you can you something like :

Bool IsUserAdmin(VOID)
{
  DWORD i;
  TCHAR  infoBuf[INFO_BUFFER_SIZE];
  DWORD  bufCharCount = INFO_BUFFER_SIZE;
  char admin[]="Admin" /* char admin[]="Administrator"
 
  // Get and display the user name. 
  bufCharCount = INFO_BUFFER_SIZE;
  if( !GetUserName( infoBuf, &bufCharCount ) )
	  ::MessageBox(0,"GetUserName","Can not read user name",0); 
  s.Format("%s", infoBuf ); 

  if(strcmp(s,admin))
     return 1;
  else
     return 0;
}


Have Best Luck this time... Blush | :O

Jagdish Bhimbha
S/W Developer

Questionerror in Access DB "Attempt to Update or Delete failed." and "Recordset is read-only" Pin
Le@rner11-Jun-08 21:04
Le@rner11-Jun-08 21:04 
AnswerRe: error in Access DB "Attempt to Update or Delete failed." and "Recordset is read-only" Pin
Joseph Marzbani11-Jun-08 23:06
Joseph Marzbani11-Jun-08 23:06 
GeneralRe: error in Access DB "Attempt to Update or Delete failed." and "Recordset is read-only" Pin
Le@rner11-Jun-08 23:41
Le@rner11-Jun-08 23:41 
AnswerRe: error in Access DB "Attempt to Update or Delete failed." and "Recordset is read-only" Pin
David Crow12-Jun-08 4:23
David Crow12-Jun-08 4:23 
QuestionDoubt in Serial communication Pin
kuttiam11-Jun-08 19:47
kuttiam11-Jun-08 19:47 
AnswerRe: Doubt in Serial communication Pin
Cedric Moonen11-Jun-08 20:44
Cedric Moonen11-Jun-08 20:44 
GeneralRe: Doubt in Serial communication Pin
kuttiam11-Jun-08 21:22
kuttiam11-Jun-08 21:22 
GeneralRe: Doubt in Serial communication Pin
Cedric Moonen11-Jun-08 21:42
Cedric Moonen11-Jun-08 21:42 
AnswerRe: Doubt in Serial communication Pin
buntyrolln12-Jun-08 2:09
buntyrolln12-Jun-08 2:09 
AnswerRe: Doubt in Serial communication Pin
buntyrolln12-Jun-08 2:17
buntyrolln12-Jun-08 2:17 
QuestionHow can get Index of Current Save Record in Access Database? Pin
Le@rner11-Jun-08 19:21
Le@rner11-Jun-08 19:21 
AnswerRe: How can get Index of Current Save Record in Access Database? Pin
David Crow12-Jun-08 4:25
David Crow12-Jun-08 4:25 
AnswerCP IGNORE Pin
leckey12-Jun-08 17:44
leckey12-Jun-08 17:44 
QuestionUse of Keyboard on ListCtrl. Pin
Le@rner11-Jun-08 19:14
Le@rner11-Jun-08 19:14 
AnswerRe: Use of Keyboard on ListCtrl. Pin
Naveen11-Jun-08 19:42
Naveen11-Jun-08 19:42 
GeneralRe: Use of Keyboard on ListCtrl. Pin
Le@rner11-Jun-08 20:03
Le@rner11-Jun-08 20:03 
GeneralRe: Use of Keyboard on ListCtrl. Pin
Naveen11-Jun-08 20:15
Naveen11-Jun-08 20:15 

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.