SecurityWin32Util.CreateProcessAsUser Method (IntPtr, String, String, SecurityWin32Util., SecurityWin32Util., Boolean, UInt32, IntPtr, String, SecurityWin32Util., SecurityWin32Util.)
Namespace: Microsoft.Office.Excel.Server.Addins.ComputeCluster.Security
Assembly: Microsoft.Office.Excel.Server.Addins.ComputeCluster (in Microsoft.Office.Excel.Server.Addins.ComputeCluster.dll)
Syntax
'Declaration
Public Shared Function CreateProcessAsUser ( _
hToken As IntPtr, _
lpApplicationName As String, _
lpCommandLine As String, _
ByRef lpProcessAttributes As SECURITY_ATTRIBUTES, _
ByRef lpThreadAttributes As SECURITY_ATTRIBUTES, _
bInheritHandles As Boolean, _
dwCreationFlags As UInteger, _
lpEnvironment As IntPtr, _
lpCurrentDirectory As String, _
ByRef lpStartupInfo As STARTUPINFO, _
<OutAttribute> ByRef lpProcessInformation As PROCESS_INFORMATION _
) As Boolean
'Usage
Dim hToken As IntPtr
Dim lpApplicationName As String
Dim lpCommandLine As String
Dim lpProcessAttributes As SECURITY_ATTRIBUTES
Dim lpThreadAttributes As SECURITY_ATTRIBUTES
Dim bInheritHandles As Boolean
Dim dwCreationFlags As UInteger
Dim lpEnvironment As IntPtr
Dim lpCurrentDirectory As String
Dim lpStartupInfo As STARTUPINFO
Dim lpProcessInformation As PROCESS_INFORMATION
Dim returnValue As Boolean
returnValue = SecurityWin32Util.CreateProcessAsUser(hToken, _
lpApplicationName, lpCommandLine, _
lpProcessAttributes, lpThreadAttributes, _
bInheritHandles, dwCreationFlags, _
lpEnvironment, lpCurrentDirectory, _
lpStartupInfo, lpProcessInformation)
public static bool CreateProcessAsUser(
IntPtr hToken,
string lpApplicationName,
string lpCommandLine,
ref SECURITY_ATTRIBUTES lpProcessAttributes,
ref SECURITY_ATTRIBUTES lpThreadAttributes,
bool bInheritHandles,
uint dwCreationFlags,
IntPtr lpEnvironment,
string lpCurrentDirectory,
ref STARTUPINFO lpStartupInfo,
out PROCESS_INFORMATION lpProcessInformation
)
Parameters
- hToken
Type: System.IntPtr
- lpApplicationName
Type: System.String
- lpCommandLine
Type: System.String
- lpProcessAttributes
Type: SECURITY_ATTRIBUTES
- lpThreadAttributes
Type: SECURITY_ATTRIBUTES
- bInheritHandles
Type: System.Boolean
- dwCreationFlags
Type: System.UInt32
- lpEnvironment
Type: System.IntPtr
- lpCurrentDirectory
Type: System.String
- lpStartupInfo
Type: STARTUPINFO
- lpProcessInformation
Type: PROCESS_INFORMATION
Return Value
Type: System.Boolean
See Also
Reference
Microsoft.Office.Excel.Server.Addins.ComputeCluster.Security Namespace