Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "OpenProcessToken" in [All]

Enums

.

    public const int CO_E_FAILEDTOOPENPROCESSTOKEN = unchecked((int)0x8001013C);

.

    Public Const CO_E_FAILEDTOOPENPROCESSTOKEN As Integer = CInt(&H8001013cUI)

.

    /// Required to retrieve certain information about a process, such as its token, exit code, and priority class (see OpenProcessToken).

userenv

.

in Token for the user, which is returned by the LogonUser, CreateRestrictedToken, DuplicateToken, OpenProcessToken, or OpenThreadToken function. The token must have TOKEN_QUERY and TOKEN_IMPERSONATE and TOKEN_DUPLICATE access. For more information, see Access Rights for Access-Token Objects.

advapi32

.

    internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr

.

        retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok);

.

          if (NativeMethods.OpenProcessToken(currentProcess, NativeMethods.TOKEN_ADJUST_PRIVILEGES | NativeMethods.TOKEN_QUERY, out tokenHandle))

.

                                 "OpenProcessToken failed. CurrentProcess: {0}",

.

      internal static extern bool OpenProcessToken(IntPtr processHandle,

.

    Private Function OpenProcessToken( _

.

        If Not OpenProcessToken(hProc, TOKEN_ADJUST_PRIVILEGES Or TOKEN_QUERY, hToken) Then

.

             "OpenProcessToken failed with error " & lastWin32Error.ToString & ".")

.

static extern bool OpenProcessToken(IntPtr ProcessHandle,

.

Private Function OpenProcessToken( _

.

Declare Function OpenProcessToken Lib "advapi32.dll" ( _

.

    Source: Link to ''http://groups.google.com/group/microsoft.public.dotnet.general/browse_thread/thread/5742d50ec2e9f798/c702b8d7771f9016lnk=st&q=OpenProcessToken+0x00020000&rnum=1&hl=en#c702b8d7771f9016''

.

    public static extern bool OpenProcessToken(IntPtr ProcessHandle, UInt32 DesiredAccess, out IntPtr TokenHandle);

.

        if (!OpenProcessToken(processHandle, TOKEN_READ, out tokenHandle))

.
Documentation
[OpenProcessToken] on MSDN

Constants

.

        static extern bool OpenProcessToken(

.

            if (OpenProcessToken(pId, TOKEN_QUERY, out hToken)) {

.

        public const int CO_E_FAILEDTOOPENPROCESSTOKEN = (int)(0x8001013C - 0x100000000);


 
Access PInvoke.net directly from VS: