1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-03 02:42:52 +02:00

Added check for running tomahawk.exe process and option to kill the process (or ignore) and proceed.

This commit is contained in:
Steven Robertson
2011-03-31 00:14:20 +01:00
parent 4f0322ec2f
commit 56deed391e
25 changed files with 1358 additions and 1 deletions

View File

@@ -0,0 +1,49 @@
#pragma once
//-------------------------------------------------------------------------------------------
// PSAPI function pointers
typedef BOOL (WINAPI *lpfEnumProcesses) ( DWORD *, DWORD, DWORD * );
typedef BOOL (WINAPI *lpfEnumProcessModules) ( HANDLE, HMODULE *, DWORD, LPDWORD );
typedef DWORD (WINAPI *lpfGetModuleBaseName) ( HANDLE, HMODULE, LPTSTR, DWORD );
typedef BOOL (WINAPI *lpfEnumDeviceDrivers) ( LPVOID *, DWORD, LPDWORD );
typedef BOOL (WINAPI *lpfGetDeviceDriverBaseName)( LPVOID, LPTSTR, DWORD );
//-------------------------------------------------------------------------------------------
// Internal use routines
bool LoadPSAPIRoutines( void );
bool FreePSAPIRoutines( void );
bool FindProc( char *szProcess );
bool KillProc( char *szProcess );
bool FindDev( char *szDriverName );
//-------------------------------------------------------------------------------------------
// Exported routines
extern "C" __declspec(dllexport) void FindProcess( HWND hwndParent,
int string_size,
char *variables,
stack_t **stacktop );
extern "C" __declspec(dllexport) void KillProcess( HWND hwndParent,
int string_size,
char *variables,
stack_t **stacktop );
extern "C" __declspec(dllexport) void FindDevice( HWND hwndParent,
int string_size,
char *variables,
stack_t **stacktop );