One program I use on Windows XP is the "process.exe" command-line program from
Craig.Peacock@beyondlogic.org which I find better than loading the task manager all the time for such things.
I sometimes use this program when working on Windows XP computers:
Code:
#define WIN32_LEAN_AND_MEAN /* Reduce number of system headers parsed */
/* during build. */
#include <windows.h>
#include <stdio.h>
typedef int bool;
#define false 0;
void main (int argc, char **argv)
{
char * pszDosDeviceName,
* pszNtDeviceName;
bool fRemoveDeviceName = false;
bool fResult;
/*
Command-line parsing.
1) Make sure correct number of arguments are supplied.
2) See if you should add or remove the MS-DOS Device Name.
*/
if(argc==2) {
/* Display information */
pszDosDeviceName = argv[1];
pszNtDeviceName = (char *)LocalAlloc (LPTR, MAX_PATH);
fResult = QueryDosDevice (pszDosDeviceName, pszNtDeviceName,
MAX_PATH);
if(fResult) printf("%s is linked to %s\n",pszDosDeviceName,pszNtDeviceName);
else printf("error %lu: cannot find %s\n",GetLastError(),pszDosDeviceName);
LocalFree (pszNtDeviceName);
return;
} else if (argc != 3)
{
printf("\nusage: %s <DOS device name> <NT device name> to add\n",
argv[0]);
printf("usage: %s [-r] <DOS device name> to remove\n",
argv[0]);
printf("\n\texample: %s d: \\device\\cdrom0\n", argv[0]);
return;
}
fRemoveDeviceName = !lstrcmpi (argv[1], "-r");
/* Now, add/remove the DOS device name. */
if (fRemoveDeviceName)
{
/*
Remove the MS-DOS device name. First, get the name of the Windows
NT device from the symbolic link, then delete the symbolic link.
*/
pszDosDeviceName = argv[2];
pszNtDeviceName = (char *)LocalAlloc (LPTR, MAX_PATH);
fResult = QueryDosDevice (pszDosDeviceName, pszNtDeviceName,
MAX_PATH);
if (fResult)
{
fResult = DefineDosDevice (DDD_RAW_TARGET_PATH|
DDD_REMOVE_DEFINITION|
DDD_EXACT_MATCH_ON_REMOVE,
pszDosDeviceName, pszNtDeviceName);
}
if (!fResult)
printf("error %lu: could not remove %s\n",
GetLastError(), pszDosDeviceName);
LocalFree (pszNtDeviceName);
}
else
{
/* Add the DOS device name */
pszDosDeviceName = argv[1];
pszNtDeviceName = argv[2];
fResult = DefineDosDevice (DDD_RAW_TARGET_PATH, pszDosDeviceName,
pszNtDeviceName);
if (!fResult)
printf("error %lu: could not link %s to %s\n",
GetLastError(), pszDosDeviceName, pszNtDeviceName);
}
}
One thing you can do with this is to use it to copy a disk image.
I use Linux too.