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

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.