473,385 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

CreateProcessWithLogon on Win2000

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
Nov 20 '05 #1
0 1326

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: angel | last post by:
Hi I use python on win2000.I found python perhaps spend 10~15 second on starting. How to accelerate it? Thanx
0
by: Scott Townsend | last post by:
We are trying to get the Microsoft ASPFileUpload to work on both Win2003 and Win2000 http://support.microsoft.com/default.aspx?scid=kb;en-us;q299692 We can now get large and small files on our...
4
by: Vincent Finn | last post by:
Hi, I am calling an exe from a webservice I was using CreateProcessWithLogon() but it doesn't seem to work (MSDN says it is supported) I get ERROR_ACCESS_DENIED. It works fine if I am using an...
1
by: Peter Nolan | last post by:
Hi All, I have some software that currently loads database tables into sorted arrays in memory to be binary searched by processes. (Long story as to why it does this..) Each process must either...
2
by: Grei | last post by:
how can i impersonate from win2000 to WinXP? in MSDN says: (gives example how to implemet it but not with win2000, and it doesn't say what to do on win2000!!!) any ideas? workarounds? Thanx! ...
6
by: Grei | last post by:
how can i impersonate from win2000 to WinXP? MSDN gives example how to implemet impersonation from XP to XP, but not from win2000 to XP, and it doesn't say what to do with win2000!!! any ideas?...
4
by: Strahimir Antoljak | last post by:
I completed a VB.NET application and it runs fine on WinXP. I wanted to run it on Win2000 and it is not working. Is it not supposed to work on Win2000 too? (I installed .NET framework distributable...
10
by: JP Bless | last post by:
Hi all, I have a database Access/MSDE and would like to have a website so users can search the data and update some records/fields through the website.... And I have high speed internet...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.