Hi,
I am trying to use CreateProcessWithLogon in VB.net
My code works fine when on a WinXP machine but fails on a Win2000
machine
The error is
"Object reference not set to an instance of an object"
It is the API failing since the exe doesn't start
It is being called from a web service
I declare it as
Private Declare Unicode Function CreateProcessWithLogon Lib "advapi32"
Alias "CreateProcessWithLogonW" (ByVal strUsername As String, ByVal
strDomain As String, ByVal strPassword As String, ByVal dwLogonFlags
As Integer, ByVal strApplicationName As Integer, ByVal wszCommandLine
As String, ByVal dwCreationFlags As Integer, ByVal lpEnvironment As
Integer, ByVal lpCurrentDriectory As Integer, ByRef lpStartupInfo As
STARTUPINFO, ByRef lpProcessInformation As PROCESS_INFORMATION) As
Integer
call it as
CreateProcessWithLogon(userPart, domainPart, password,
LOGON_WITH_PROFILE, 0, strCmdLine, 0, 0, 0, si, pi)
All of the inputs are valid.
Anyone seen anything like this?
Vin