Metodo NativeMethods.CreateProcessAsUser
Questo tipo dispone di un attributo SecurityCriticalAttribute, che ne determina una limitazione al solo utilizzo interno da parte di .NET Framework per la libreria di classi Silverlight. Se un membro qualsiasi di questo tipo viene utilizzato dal codice di un'applicazione, viene generata un'eccezione MethodAccessException.
Spazio dei nomi: Microsoft.TeamFoundation.Common.Internal
Assembly: Microsoft.TeamFoundation.Common (in Microsoft.TeamFoundation.Common.dll)
Sintassi
'Dichiarazione
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
)
Parametri
- hToken
Tipo: System.IntPtr
- lpApplicationName
Tipo: System.String
- lpCommandLine
Tipo: System.String
- lpProcessAttributes
Tipo: Microsoft.TeamFoundation.Common.Internal.NativeMethods.SECURITY_ATTRIBUTES%
- lpThreadAttributes
Tipo: Microsoft.TeamFoundation.Common.Internal.NativeMethods.SECURITY_ATTRIBUTES%
- bInheritHandle
Tipo: System.Boolean
- dwCreationFlags
Tipo: System.UInt32
- lpEnvironment
Tipo: System.IntPtr
- lpCurrentDirectory
Tipo: System.String
- lpStartupInfo
Tipo: Microsoft.TeamFoundation.Common.Internal.NativeMethods.STARTUPINFO%
- lpProcessInformation
Tipo: Microsoft.TeamFoundation.Common.Internal.NativeMethods.PROCESS_INFORMATION%
Valore restituito
Tipo: System.Boolean