forked from qt-creator/qt-creator
some more whitespace changes
This commit is contained in:
@@ -150,10 +150,10 @@ void AttachRemoteDialog::rebuildProcessList()
|
||||
#include <stdio.h>
|
||||
|
||||
// Forward declarations:
|
||||
BOOL GetProcessList( );
|
||||
BOOL ListProcessModules( DWORD dwPID );
|
||||
BOOL ListProcessThreads( DWORD dwOwnerPID );
|
||||
void printError( TCHAR* msg );
|
||||
BOOL GetProcessList();
|
||||
BOOL ListProcessModules(DWORD dwPID);
|
||||
BOOL ListProcessThreads(DWORD dwOwnerPID);
|
||||
void printError(TCHAR* msg);
|
||||
|
||||
BOOL GetProcessList( )
|
||||
{
|
||||
@@ -164,7 +164,7 @@ BOOL GetProcessList( )
|
||||
|
||||
// Take a snapshot of all processes in the system.
|
||||
hProcessSnap = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
|
||||
if( hProcessSnap == INVALID_HANDLE_VALUE )
|
||||
if (hProcessSnap == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
printError( TEXT("CreateToolhelp32Snapshot (of processes)") );
|
||||
return( FALSE );
|
||||
@@ -175,7 +175,7 @@ BOOL GetProcessList( )
|
||||
|
||||
// Retrieve information about the first process,
|
||||
// and exit if unsuccessful
|
||||
if( !Process32First( hProcessSnap, &pe32 ) )
|
||||
if (!Process32First( hProcessSnap, &pe32 ))
|
||||
{
|
||||
printError( TEXT("Process32First") ); // show cause of failure
|
||||
CloseHandle( hProcessSnap ); // clean the snapshot object
|
||||
@@ -193,12 +193,12 @@ BOOL GetProcessList( )
|
||||
// Retrieve the priority class.
|
||||
dwPriorityClass = 0;
|
||||
hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID );
|
||||
if( hProcess == NULL )
|
||||
if (hProcess == NULL)
|
||||
printError( TEXT("OpenProcess") );
|
||||
else
|
||||
{
|
||||
dwPriorityClass = GetPriorityClass( hProcess );
|
||||
if( !dwPriorityClass )
|
||||
if (!dwPriorityClass)
|
||||
printError( TEXT("GetPriorityClass") );
|
||||
CloseHandle( hProcess );
|
||||
}
|
||||
@@ -207,7 +207,7 @@ BOOL GetProcessList( )
|
||||
printf( "\n Thread count = %d", pe32.cntThreads );
|
||||
printf( "\n Parent process ID = 0x%08X", pe32.th32ParentProcessID );
|
||||
printf( "\n Priority base = %d", pe32.pcPriClassBase );
|
||||
if( dwPriorityClass )
|
||||
if (dwPriorityClass)
|
||||
printf( "\n Priority class = %d", dwPriorityClass );
|
||||
|
||||
// List the modules and threads associated with this process
|
||||
@@ -228,7 +228,7 @@ BOOL ListProcessModules( DWORD dwPID )
|
||||
|
||||
// Take a snapshot of all modules in the specified process.
|
||||
hModuleSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, dwPID );
|
||||
if( hModuleSnap == INVALID_HANDLE_VALUE )
|
||||
if (hModuleSnap == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
printError( TEXT("CreateToolhelp32Snapshot (of modules)") );
|
||||
return( FALSE );
|
||||
@@ -239,7 +239,7 @@ BOOL ListProcessModules( DWORD dwPID )
|
||||
|
||||
// Retrieve information about the first module,
|
||||
// and exit if unsuccessful
|
||||
if( !Module32First( hModuleSnap, &me32 ) )
|
||||
if (!Module32First( hModuleSnap, &me32 ))
|
||||
{
|
||||
printError( TEXT("Module32First") ); // show cause of failure
|
||||
CloseHandle( hModuleSnap ); // clean the snapshot object
|
||||
@@ -271,7 +271,7 @@ BOOL ListProcessThreads( DWORD dwOwnerPID )
|
||||
|
||||
// Take a snapshot of all running threads
|
||||
hThreadSnap = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 );
|
||||
if( hThreadSnap == INVALID_HANDLE_VALUE )
|
||||
if (hThreadSnap == INVALID_HANDLE_VALUE)
|
||||
return( FALSE );
|
||||
|
||||
// Fill in the size of the structure before using it.
|
||||
@@ -279,7 +279,7 @@ BOOL ListProcessThreads( DWORD dwOwnerPID )
|
||||
|
||||
// Retrieve information about the first thread,
|
||||
// and exit if unsuccessful
|
||||
if( !Thread32First( hThreadSnap, &te32 ) )
|
||||
if (!Thread32First( hThreadSnap, &te32 ))
|
||||
{
|
||||
printError( TEXT("Thread32First") ); // show cause of failure
|
||||
CloseHandle( hThreadSnap ); // clean the snapshot object
|
||||
@@ -291,7 +291,7 @@ BOOL ListProcessThreads( DWORD dwOwnerPID )
|
||||
// associated with the specified process
|
||||
do
|
||||
{
|
||||
if( te32.th32OwnerProcessID == dwOwnerPID )
|
||||
if (te32.th32OwnerProcessID == dwOwnerPID)
|
||||
{
|
||||
printf( "\n\n THREAD ID = 0x%08X", te32.th32ThreadID );
|
||||
printf( "\n Base priority = %d", te32.tpBasePri );
|
||||
|
||||
Reference in New Issue
Block a user