I would like to start a new instance of a wcf service host from another (UI) application. I need the service to be out of process because I want to make use of the entire 1.4GB memory limit for a 32bit .NET process.
The obvious method is to use System.Diagnostics.Process.Start(processStartInfo) but I would like to find out whether it is...
I need to run several functions at the same time. I had successfully implemented in C# by creating an ElapsedEventHandler and executing it when a timer gets elapsed. In this way I could run a number of functions at the same time (delegates). How can I do the same thing using php?
...
I am currently writing a very lightweight program so I have to use C++ since it is not bound to .NET framework which drastically increases size of the program.
I need to be able to terminate process and to do that I need to get a process handle. Unfortuanately I haven't figured how to do that yet.
P.S. I know that to kill a process yo...
Hi:
I am working on a c# application that spawn new Processes to run Perl programs:
I was wondering if there is a way to use socket interface to let perl program to talk to c# application. If using socket, the address has to be local host: 127.0.0.1? How to choose
which port number to use?
also,
Since the C# application spawn a Proce...
Is there a way to get the date/time that a service last started in C#.
I'm using this code now to check the status of services:
ServiceController sc = new ServiceController(serviceName);
// check sc.status for "Running" etc... with a Switch statement...
Can I do it with this object? Or need WMI?
(Reason: I'm writing a little BizT...
I have a program that executes another program and the main program continues when that program is finished.
Process p = Process.Start("program2.exe");
while (!p.HasExited)
Thread.Sleep(10000);
if (p.HasExited)
{
// Execute more code
}
This works great as when I run the program. But does not work when it is used as a schedule...
I have the following code section, designed to count how many Excel processes are currently open:
Func<int> OpenExcelProcessesCount =
() => System.Diagnostics.Process.GetProcessesByName("Excel")
.Where(p => !p.HasExited)
.Count();
And then later I retrieve the count at various points, with code such as...
Hi everyone!
I would like to create background application which will listen to what applications are started and what are moved to foreground.
Please reply
If question is not clear will explain again.
Thanks
...
i am making a small library that will basically capture the standard outputs of a program (such as printf()) into a separate process/thread...this process should then perform certain tasks (lets say write these captured outputs to a file)...i am just beginning to do serious C programming so i am still learning.
i wanted to know what is ...
Hi
Is there a way to prevent users from locking up a linux machine with code something along the lines of:
#import <stdio.h>
int main (int argc, char** argv)
{
while (1)
fork();
}
The computers in question are in a computer lab, so I can't exactly disallow compiling... but is there some way of ensuring such processes only...
Actually I want to make an application which will getGlobalEvent and control that event through another custom application. Is there any way to do so. Can i get global event from a particular application? Its like an application which will lock custom application in your blackberry, if you add following application in that locking app li...
I'm not very experienced with subjects such as Concurrency and Multithreading. In fact, in most of my web-development career I had never needed to touch these subjects.
I feel like it's an important concept, especially for Desktop applications and basically any other application that doesn't generate HTML :).
After reading a bit on con...
I have a queue (Amazon SQS) of data that needs to be processed, and I would like to do it with multiple processes (in PHP).
I want the child workers to do something like this (pseduoish code):
while(true) {
$array = $queue->fetchNItems(10); // get 10 items
if(!count($array))
killProcess();
foreach($array as $...
I'm working on a testing framework that needs to be able to record a user's activities and then replay them. I'm fine using the ManagedWinAPI wrappers around P/Invoke ( working in C# ) to record mouse and keyboard activity, which works but I think that in order to make the recording more useful I need to know more about what happens when...
Hi,
I want to get a list with all the threads (except the main, GUI thread) from within my application in order to do some action(s) with them. (set priority, kill, pause etc.)
How to do that?
...
What is the best way to programmatically access the processes sorted by cpu rate on the iPhone (similar to that seen in the *nix top command)? sysctl()?
...
What system calls are used? I want to use it to read memory locations scattered inside a different process's address space. Is this a reasonable use case for this mechanism?
...
I am writing a C# application that, among other things, automatically closes the advertisement a certain game displays after the user exits the game. My program accomplishes this by killing the game process when it detects that the user has exited the game. My program is similar to an Autohotkey script written by someone else that does s...
I am working on a project that requires sandboxing an application. I am able to create a windows user, create a directory, fill the directory with an application, and run the application as a user. This works completely fine running as a console application, but when I install it as a service, I get this exception:
System.ComponentModel...
I need a script that check if a particular process is running and return something if not found. I know that this can be done using subprocess, but is there a simpler way to do it?
...