Sorry. It's my fault.
For example, I have a domain with machine A, B and C.
A is the domain controller. It can access the info in B and C, like
files or registry, etc.
Now i want to write a program running in B.
The program needs to fetch the info from A and C.
This operation needs the privilege of domain controller, but i don't
know how to get it.
You don't seem to understand how domain membership works, do you? The domain
controller has no access to B and C, domain accounts may have access to B
and C, and this only when they are given access to resources on B or C.
This means that if you have a domain account with access privileges to B and
C, you need to logon into the domain using this domain account and run the
program. If you login usung a local account (say on B), you'll have to call
Win32 API 'LogonUser' using the domain credentials in order to obtain an
access token, and impersonate this token when accessing A or C's resources.
The framework doc's on MSDN have an example that illustrates this (search
for LogonUser).
Willy.