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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
Back
Top