Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than advapi32, prefix the name with the module name and a period.
createprocesswithlogonw (advapi32)
.
"Try this for VB"
Imports System.Runtime.InteropServices
Public Structure PROCESS_INFORMATION
private/Public hProcess As Integer
private/Public hThread As Integer
private/Public dwProcessId As Integer
private/Public dwThreadId As Integer
End Structure
' Use this version when the API allocates the strings
' (For example: GetStartupInfo)
Structure STARTUPINFO
Private/Public cb As Integer
private/Public lpReserved As Integer ' Instead of String!
private/Public lpDesktop As Integer ' Instead of String!
private/Public lpTitle As Integer ' Instead of String!
private/Public dwX As Integer
private/Public dwY As Integer
private/Public dwXSize As Integer
private/Public dwYSize As Integer
private/Public dwXCountChars As Integer
private/Public dwYCountChars As Integer
private/Public dwFillAttribute As Integer
private/Public dwFlags As Integer
private/Public wShowWindow As Short
private/Public cbReserved2 As Short
private/Public lpReserved2 As Integer
private/Public hStdInput As Integer
private/Public hStdOutput As Integer
private/Public hStdError As Integer
End Structure
Private/Public Function CreateProcessWithLogonW( _
"""<MarshalAs(UnmanagedType.LPWStr)>""" ByVal lpUsername As String, _
"""<MarshalAs(UnmanagedType.LPWStr)>""" ByVal lpDomain As String, _
"""<MarshalAs(UnmanagedType.LPWStr)>""" ByVal lpPassword As String, _
ByVal dwLogonFlags As Integer, _
"""ByVal lpApplicationName As Integer""", _
"""<MarshalAs(UnmanagedType.LPWStr)>""" ByVal lpCommandLine As String, _
ByVal dwCreationFlags As Integer, _
"""ByVal lpEnvironment As Integer""", _
"""<MarshalAs(UnmanagedType.LPWStr)>""" ByVal lpCurrentDirectory As String, _
ByRef lpStartupInfo As STARTUPINFO, _
ByRef lpProcessInformation As PROCESS_INFORMATION _
) As Integer
End Function
class Class1
{
public const UInt32 Infinite = 0xffffffff;
public const Int32 Startf_UseStdHandles = 0x00000100;
public const Int32 StdOutputHandle = -11;
public const Int32 StdErrorHandle = -12;
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
public struct StartupInfo
{
public int cb;
public String reserved;
public String desktop;
public String title;
public int x;
public int y;
public int xSize;
public int ySize;
public int xCountChars;
public int yCountChars;
public int fillAttribute;
public int flags;
public UInt16 showWindow;
public UInt16 reserved2;
public byte reserved3;
public IntPtr stdInput;
public IntPtr stdOutput;
public IntPtr stfError;
}
internal struct ProcessInformation
{
public IntPtr process;
public IntPtr thread;
public int processId;
public int threadId;
}
ByVal is a VB keyword that specifies a variable to be passed as a parameter BY VALUE. In other words, if the function or sub changes the value of the internal variable, it does not change the value of the external variable that was passed to it.
4/25/2007 3:19:55 AM - josep1er@cmich.edu-141.209.229.179
ByVal is a VB keyword that specifies a variable to be passed as a parameter BY VALUE. In other words, if the function or sub changes the value of the internal variable, it does not change the value of the external variable that was passed to it.
4/25/2007 3:19:55 AM - josep1er@cmich.edu-141.209.229.179
ByVal is a VB keyword that specifies a variable to be passed as a parameter BY VALUE. In other words, if the function or sub changes the value of the internal variable, it does not change the value of the external variable that was passed to it.
4/25/2007 3:19:55 AM - josep1er@cmich.edu-141.209.229.179
ByVal is a VB keyword that specifies a variable to be passed as a parameter BY VALUE. In other words, if the function or sub changes the value of the internal variable, it does not change the value of the external variable that was passed to it.
4/25/2007 3:19:55 AM - josep1er@cmich.edu-141.209.229.179
ByVal is a VB keyword that specifies a variable to be passed as a parameter BY VALUE. In other words, if the function or sub changes the value of the internal variable, it does not change the value of the external variable that was passed to it.
4/25/2007 3:19:55 AM - josep1er@cmich.edu-141.209.229.179
ByVal is a VB keyword that specifies a variable to be passed as a parameter BY VALUE. In other words, if the function or sub changes the value of the internal variable, it does not change the value of the external variable that was passed to it.
4/25/2007 3:19:55 AM - josep1er@cmich.edu-141.209.229.179
Passed in place of STARTUPINFO to extend CreateProcess
7/8/2019 11:50:55 AM - dahall-72.24.140.51
The '''PROCESS_INFORMATION''' structure is filled in by either the CreateProcess, CreateProcessAsUser, CreateProcessWithLogonW, or CreateProcessWithTokenW function with information about the newly created process and its primary thread.
8/9/2010 12:13:12 PM - -97.79.160.250
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).