how in csharp seeting rights and roles outside of an exe or dll?

Hi folks,

i have to hold a lecture in the drawer programming in c#.
In addition I need still another example.

How can I write a program or an dll-component that says to me,
which rights and for
calling a method needs roles it?
(write it out to command-line, or as
an exception with turn off my programm)

In the method e.g. a file is to be read, if the rights are set for
reading the file for the respective user (entered in the system
control under Windows).

How can I from the outside set then (over the system control, or by
parameters with the program call) these rights?

I hear for a
“Act as Part of the Operating System” privilege and for using the
Win32 API.

Do you have a simple example with example code?

How does the example have to look, if my program example.exe
on my PC is started,
but the component example.dll with the method on another PC
in the InterNet is situated?

If the other PC says to me, which rights must be set there, how I can
make that from my PC? Only the program telnet occurs to me. Or do I
see that false?


Greetings Marian

You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)