By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,617 Members | 1,896 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,617 IT Pros & Developers. It's quick & easy.

CreateProcessWithLogon on Win2000

P: n/a

I am trying to use CreateProcessWithLogon in

My code works fine when on a WinXP machine but fails on a Win2000

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

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?

Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.