processes

Better way of opening a Document from Java?

I've been using the following code to open Office Documents, PDF, etc. on my windows machines using Java and it's working fine, except for some reason when a filename has embedded it within it multiple contiguous spaces like "File[SPACE][SPACE]Test.doc". How can I make this work? I'm not averse to canning the whole piece of code... but...

Starting a process with inherited stdin/stdout/stderr in Java 6

If I start a process via Java's ProcessBuilder class, I have full access to that process's standard in, standard out, and standard error streams as Java InputStreams and OutputStreams. However, I can't find a way to seamlessly connect those streams to System.in, System.out, and System.err. It's possible to use redirectErrorStream() to g...

How to tell if a process is running on a mobile device

I have the handle of process 'A' on a Pocket PC 2003 device. I need to determine if that process is still running from process 'B'. Process 'B' is written in Embedded Visual C++ 4.0. ...

How to find and kill running Win-Processes from within Java?

Hi, I need a Java way to find a running Win process from which I know to name of the executable. I want to look whether it is running right now and I need a way to kill the process if I found it. Thank you! Greetz, GHad ...

What is the best choice for .net inter-process communication?

Should I use Named Pipes, or .NET Remoting to communicate with a running process on my machine? ...

How do I delay code execution in Visual Basic (VB6)?

I have a long running process in VB6 that I want to finish before executing the next line of code. How can I do that? Built-in function? Can I control how long to wait? Trivial example: Call ExternalLongRunningProcess Call DoOtherStuff How do I delay 'DoOtherStuff'? ...

Per-process CPU usage on Win95 / Win98 / WinME

How can you programmatically measure per-process (or better, per-thread) CPU usage under windows 95, windows 98 and windows ME? If it requires the DDK, where can you obtain that? Please note the Win9x requirement. It's easy on NT. EDIT: I tried installing the Win95/98 version of WMI, but Win32_Process.KernelModeTime and Win32_Process....

What are some project management tips and processes for a single-developer team?

I usually have some project that I can do alone that take around 6 months to 1 year. I always try to have some "release" date and write few documentations (external to the code). My question is, what type of management do you use when you do not have a team with you but you are alone? Example, I was thinking about Agile Programming BUT...

Never do anything until you ready to use it, in software too? [Toyota principle]

I was listening to a podcast. Where they talked about principles Toyota was using. " - Never do anything until you are ready to use it." I think this tell us to look in other places, to learn what other practices have known for years. Ok, here is the podcast. I think it is interesting http://itc.conversationsnetwork.org/shows/detai...

Never produce to an unknown pathway, in software too? [Toyota principle]

In Toyota manufacturing lines they always know what path a part have traveled. Just so they can be sure they can fix it of something goes wrong. Is this applicable in software too? All error messages should tell me exactly what path they traveled. Some do, the error messages with stack trace. Is this a correct interpretation? Could it b...

How do I handle multiple streams in Java?

I'm trying to run a process and do stuff with its input, output and error streams. The obvious way to do this is to use something like select(), but the only thing I can find in Java that does that is Selector.select(), which takes Channels. It doesn't appear to be possible to get a Channel from an InputStream or OutputStream (FileStream...

Process to pass from problem to code. How did you learn?

I'm teaching/helping a student to program. I remember the following process always helped me when I started; It looks pretty intuitive and I wonder if someone else have had a similar approach. Read the problem and understand it ( of course ) . Identify possible "functions" and variables. Write how would I do it step by step ( algorith...

GetExitCodeProcess() returns 128

I have a DLL that's loaded into a 3rd party parent process as an extension. From this DLL I instantiate external processes (my own) by using CreateProcess API. This works great in 99.999% of the cases but sometimes this suddenly fails and stops working permanently (maybe a restart of the parent process would solve this but this is undesi...

The exec family

I have a project the requires the use of the exec family. My project consist of making an interactive shell. The shell will implement a few basic commands like cd, ls, echo, etc. I have been researching the use of exec, but have not found a useful site. Any suggested links would help. int ret; ret = execl ("/bin/ls", "ls", "-1", (char *...

How to wait on another process's status in .NET?

I'm working on an integration testing project in .NET. The testing framework executable starts a service and then needs to wait for the service to complete an operation. What is the best approach for the exe to wait on the service to complete its task (the service itself will not exit upon task completion)? Both processes have access t...

C++ thread/process identifier

Is there a portable way of getting thread and/or process identifier (string, int, ...) with C++? ...

What is the best way to handle change management?

My organization's main project went live on Monday. That was my third day here. Now that I've been here almost a week, I'm tasked with creating a change management plan for the maintenance of the application and preparation for phase 2, which will commence "someday." We're a Microsoft shop but open-minded. I'm looking for some suggestio...

How can a Win32 process get the pid of its parent?

I'm currently passing the pid on the command line to the child, but is there a way to do this in the Win32 API? Alternatively, can someone alleviate my fear that the pid I'm passing might belong to another process after some time if the parent has died? ...

What happens if I don't close a System.Diagnostics.Process in my C# console app?

I have a C# app which uses a System.Diagnostics.Process to run another exe. I ran into some example code where the process is started in a try block and closed in a finally block. I also saw example code where the process is not closed. What happens when the process is not closed? Are the resources used by the process reclaimed whe...

How do I programmatically use the "using" keyword in C#?

I have some System.Diagnotics.Processes to run. I'd like to call the close method on them automatically. Apparently the "using" keyword does this for me. Is this the way to use the using keyword? foreach(string command in S) // command is something like "c:\a.exe" { try { using(p = Process.Start(command)) { ...