473,326 Members | 2,013 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,326 software developers and data experts.

createprocess doesnt work in .NET ( i am using vb .NET )

in VB6 the api declares the createprocess lbEnv var as any. When converted to
..NET is change the type any to Object. The problem is, what kind of object. I
can not get the env variables set when excuting a process with createprocess.
I dont know if its the fact that VB.NET doesnt support null terminated
strings, or if its createprocess that is creating the problem.

I need example code, executing an console/dos exe, in its own environment
vars and putting the results in a var.

Jul 21 '05 #1
1 1948
you could rather use the System.Diagnostic.Process class to start off the
console/dos exe. Take a look at the Process class and The ProcessStartInfo
class - these are most likely the classes you'll need to accomplish what you
are attempting to do with CreateProcess.
here's one article with some sample code:
http://www.devx.com/dotnet/Article/7914/1763

hope that helps..
Imran.

"DOT NET JIM" <DOT NET JI*@discussions.microsoft.com> wrote in message
news:E1**********************************@microsof t.com...
in VB6 the api declares the createprocess lbEnv var as any. When converted to .NET is change the type any to Object. The problem is, what kind of object. I can not get the env variables set when excuting a process with createprocess. I dont know if its the fact that VB.NET doesnt support null terminated
strings, or if its createprocess that is creating the problem.

I need example code, executing an console/dos exe, in its own environment
vars and putting the results in a var.

Jul 21 '05 #2

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

Similar topics

2
by: Achim Domma | last post by:
Hi, I try to start a process on windows using win32process.CreateProcess and want to to redirect the output. I set the STARTF_USESTDHANDLES flag in the STARTUPINFO structure. But I can not...
0
by: ByteSize | last post by:
Would be grateful of advice please. I have code in VB6 working as follows: lngReply = CreateProcess(sNull, txtStart, ByVal 0&, ByVal 0&, 1&, _ NORMAL_PRIORITY_CLASS, ByVal 0&, sNull, sInfo,...
5
by: Stefano Camaiani | last post by:
Hello, please someone have the working code on how to call the CreateProcess API in Vb.Net? I need to call the CreateProcess API directly and i should not use the Vb.Net Process functions like dim...
2
by: Paul Schenk | last post by:
Hi All :) Would be grateful of advice please. I have code in VB6 working as follows: lngReply = CreateProcess(sNull, txtStart, ByVal 0&, ByVal 0&, 1&, _ NORMAL_PRIORITY_CLASS, ByVal 0&,...
1
by: DOT NET JIM | last post by:
in VB6 the api declares the createprocess lbEnv var as any. When converted to ..NET is change the type any to Object. The problem is, what kind of object. I can not get the env variables set when...
1
by: Jai | last post by:
Please provide sample code for using Createprocess in VB.NET. The code I am using is given below. But I get "Error 91: Object referrence not set to an instance of the object" at CreateProcess...
3
by: stefan.sedich | last post by:
Hi im trying to open a saved email in outlook, im using createprocess, to open outlook and pass the saved email as an argument, my problem is, im trying to wait until the process ends so my program...
1
by: stefan.sedich | last post by:
Hi I am trying to open an email in outlook with the following string command = "c:\\Program Files\\Microsoft Office\\OFFICE11\\OUTLOOK.EXE c:\\a.msg"; StartupInfo si = new StartupInfo();...
6
by: ss.teo | last post by:
I want to fork a new process and my executable binary is stored inside somewhere. Is there any possible way to fork a process using CreateProcess API without writing to the disk first? Like let's...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.