Partager via


NativeMethods.CreateProcessAsUser, méthode

Ce type a un attribut SecurityCriticalAttribute, qui le limite à un usage interne par la bibliothèque de classes .NET Framework pour Silverlight. Un code d'application qui utilise un membre de ce type lève une exception MethodAccessException.

Espace de noms :  Microsoft.TeamFoundation.Common.Internal
Assembly :  Microsoft.TeamFoundation.Common (dans Microsoft.TeamFoundation.Common.dll)

Syntaxe

'Déclaration
Public Shared Function CreateProcessAsUser ( _
    hToken As IntPtr, _
    lpApplicationName As String, _
    lpCommandLine As String, _
    ByRef lpProcessAttributes As NativeMethods.SECURITY_ATTRIBUTES, _
    ByRef lpThreadAttributes As NativeMethods.SECURITY_ATTRIBUTES, _
    bInheritHandle As Boolean, _
    dwCreationFlags As UInteger, _
    lpEnvironment As IntPtr, _
    lpCurrentDirectory As String, _
    ByRef lpStartupInfo As NativeMethods.STARTUPINFO, _
    <OutAttribute> ByRef lpProcessInformation As NativeMethods.PROCESS_INFORMATION _
) As Boolean
public static bool CreateProcessAsUser(
    IntPtr hToken,
    string lpApplicationName,
    string lpCommandLine,
    ref NativeMethods.SECURITY_ATTRIBUTES lpProcessAttributes,
    ref NativeMethods.SECURITY_ATTRIBUTES lpThreadAttributes,
    bool bInheritHandle,
    uint dwCreationFlags,
    IntPtr lpEnvironment,
    string lpCurrentDirectory,
    ref NativeMethods.STARTUPINFO lpStartupInfo,
    out NativeMethods.PROCESS_INFORMATION lpProcessInformation
)

Paramètres

Valeur de retour

Type : System.Boolean

Voir aussi

Référence

NativeMethods Classe

Microsoft.TeamFoundation.Common.Internal, espace de noms