PC Review


Reply
Thread Tools Rate Thread

CreateProcessWithLogon on Win2000

 
 
Vincent Finn
Guest
Posts: n/a
 
      18th Jun 2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Application failed to intialize" with CreateProcessWithLogon =?Utf-8?B?U3RldmU0RA==?= Microsoft C# .NET 6 13th Apr 2006 03:33 PM
CreateProcessWithLogon and managed Processes =?Utf-8?B?RXJpYyBMaXZpbmdzdG9u?= Microsoft Dot NET 2 16th Sep 2005 02:10 PM
CreateProcessWithLogon\AdjustTokenPrivileges on Win2K Vincent Finn Microsoft Dot NET 4 30th Jun 2004 12:13 PM
CreateProcessWithLogon Vs Runas patanish Microsoft Windows 2000 Developer 1 21st May 2004 08:31 AM
Read/Write access problem with a file on Win2000 Server from Win2000 Workstation Greg Doherty Microsoft Windows 2000 Security 3 6th Apr 2004 01:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:45 AM.