| 
            
              WindowsApiCreateProcessWithTokenW Method
             | 
          
        
        
            Win32 CreateProcessWithTokenW function.
            
        
        Namespace: GSF.InteropAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.258-beta+f8b6aa3dbfe0b4cc2b0b0760dd5d2a3dd4f59d09
Syntax[DllImportAttribute("advapi32", CharSet = CharSet.Unicode, SetLastError = true)]
public static bool CreateProcessWithTokenW(
	IntPtr hToken,
	WindowsApiLogonFlags dwLogonFlags,
	string lpApplicationName,
	string lpCommandLine,
	WindowsApiCreationFlags dwCreationFlags,
	IntPtr lpEnvironment,
	string lpCurrentDirectory,
	in WindowsApiSTARTUPINFO lpStartupInfo,
	out WindowsApiPROCESS_INFORMATION lpProcessInformation
)<DllImportAttribute("advapi32", CharSet := CharSet.Unicode, SetLastError := true>]
Public Shared Function CreateProcessWithTokenW ( 
	hToken As IntPtr,
	dwLogonFlags As WindowsApiLogonFlags,
	lpApplicationName As String,
	lpCommandLine As String,
	dwCreationFlags As WindowsApiCreationFlags,
	lpEnvironment As IntPtr,
	lpCurrentDirectory As String,
	ByRef lpStartupInfo As WindowsApiSTARTUPINFO,
	<OutAttribute> ByRef lpProcessInformation As WindowsApiPROCESS_INFORMATION
) As Booleanpublic:
[DllImportAttribute(L"advapi32", CharSet = CharSet::Unicode, SetLastError = true)]
static bool CreateProcessWithTokenW(
	IntPtr hToken, 
	WindowsApiLogonFlags dwLogonFlags, 
	String^ lpApplicationName, 
	String^ lpCommandLine, 
	WindowsApiCreationFlags dwCreationFlags, 
	IntPtr lpEnvironment, 
	String^ lpCurrentDirectory, 
	[InAttribute] WindowsApiSTARTUPINFO% lpStartupInfo, 
	[OutAttribute] WindowsApiPROCESS_INFORMATION% lpProcessInformation
)
GSF.Interop.WindowsApi.CreateProcessWithTokenW = function(hToken, dwLogonFlags, lpApplicationName, lpCommandLine, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation);
 View SourceParameters
- hToken  IntPtr
 -  
 - dwLogonFlags  WindowsApiLogonFlags
 -  
 - lpApplicationName  String
 -  
 - lpCommandLine  String
 -  
 - dwCreationFlags  WindowsApiCreationFlags
 -  
 - lpEnvironment  IntPtr
 -  
 - lpCurrentDirectory  String
 -  
 - lpStartupInfo  WindowsApiSTARTUPINFO
 -  
 - lpProcessInformation  WindowsApiPROCESS_INFORMATION
 -  
 
Return Value
Boolean
See Also