Click here to Skip to main content
15,905,508 members
Home / Discussions / C#
   

C#

 
GeneralRe: Insertion Point's location in a RichTextBox Pin
LongRange.Shooter16-Jul-04 9:41
LongRange.Shooter16-Jul-04 9:41 
GeneralRe: Insertion Point's location in a RichTextBox Pin
bneacetp16-Jul-04 9:49
bneacetp16-Jul-04 9:49 
GeneralDirectoryServices - NT authentication Pin
Ruchi Gupta16-Jul-04 6:51
Ruchi Gupta16-Jul-04 6:51 
GeneralRe: DirectoryServices - NT authentication Pin
Member 76135316-Jul-04 7:05
Member 76135316-Jul-04 7:05 
GeneralExcel App In Win Form Pin
Mehbub16-Jul-04 6:36
Mehbub16-Jul-04 6:36 
GeneralRe: Excel App In Win Form Pin
LongRange.Shooter16-Jul-04 9:19
LongRange.Shooter16-Jul-04 9:19 
GeneralExcel App in Win Form Pin
Mehbub16-Jul-04 6:29
Mehbub16-Jul-04 6:29 
GeneralUser rights in .NET Pin
Member 76135316-Jul-04 5:57
Member 76135316-Jul-04 5:57 
Hi folks,

Im building an application that at some point accepts a user name and password. I want to check that a) this user is indeed a valid user and b) that the user account has the right to "Log On as a service" to the local machine on which the application runs.

The first part is easily accomplished by using the advapi32.dll - LogonUser function in an example I found elsewhere.

However, how to check if the user account has the "Log on as a service" right (SeServiceLogonRight)? Ive found out that I (probably) need to once again DllImport a function from advapi32.dll, and that this time it is the "LsaEnumerateAccountRights" function, which I should use to retrieve a list of rights, associated with the user.

However, I cant quite get this to work! Could anyone provide me with a working c# example for performing the above check, I would be very grateful!





/Zalkina
GeneralRe: User rights in .NET Pin
Nick Parker16-Jul-04 6:25
protectorNick Parker16-Jul-04 6:25 
GeneralRe: User rights in .NET Pin
Member 76135316-Jul-04 6:51
Member 76135316-Jul-04 6:51 
GeneralRe: User rights in .NET Pin
Nick Parker16-Jul-04 8:19
protectorNick Parker16-Jul-04 8:19 
GeneralRe: User rights in .NET Pin
LongRange.Shooter16-Jul-04 9:24
LongRange.Shooter16-Jul-04 9:24 
QuestionHow To Change the cursor direction? Pin
kings_116-Jul-04 5:39
kings_116-Jul-04 5:39 
AnswerRe: How To Change the cursor direction? Pin
Nick Parker16-Jul-04 6:06
protectorNick Parker16-Jul-04 6:06 
GeneralRe: How To Change the cursor direction? Pin
kings_116-Jul-04 10:23
kings_116-Jul-04 10:23 
GeneralRe: How To Change the cursor direction? Pin
Nick Parker16-Jul-04 12:04
protectorNick Parker16-Jul-04 12:04 
AnswerRe: How To Change the cursor direction? Pin
LongRange.Shooter16-Jul-04 9:30
LongRange.Shooter16-Jul-04 9:30 
Generalreading access database Pin
funaki16-Jul-04 3:14
funaki16-Jul-04 3:14 
GeneralRe: reading access database Pin
Nick Parker16-Jul-04 3:46
protectorNick Parker16-Jul-04 3:46 
GeneralRe: reading access database Pin
Anonymous16-Jul-04 7:37
Anonymous16-Jul-04 7:37 
GeneralCompact Framework Timer Pin
j1e1g116-Jul-04 2:31
j1e1g116-Jul-04 2:31 
GeneralRe: Compact Framework Timer Pin
Nick Parker16-Jul-04 2:44
protectorNick Parker16-Jul-04 2:44 
QuestionCompact Framework Progress Bar? Pin
j1e1g116-Jul-04 2:13
j1e1g116-Jul-04 2:13 
AnswerRe: Compact Framework Progress Bar? Pin
Colin Angus Mackay16-Jul-04 2:30
Colin Angus Mackay16-Jul-04 2:30 
AnswerRe: Compact Framework Progress Bar? Pin
Nick Parker16-Jul-04 2:32
protectorNick Parker16-Jul-04 2:32 

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.