| Index: installer/src/installer-lib/process.cpp |
| =================================================================== |
| --- a/installer/src/installer-lib/process.cpp |
| +++ b/installer/src/installer-lib/process.cpp |
| @@ -4,38 +4,10 @@ |
| // <thread> is C++11, but implemented in VS2012 |
| #include <thread> |
| +#include "installer-lib.h" |
| #include "process.h" |
| //------------------------------------------------------- |
| -// Windows_Handle |
| -//------------------------------------------------------- |
| -Windows_Handle::Windows_Handle( HANDLE h ) |
| - : handle( h ) |
| -{ |
| - validate_handle() ; |
| -} |
| - |
| -Windows_Handle::~Windows_Handle() |
| -{ |
| - CloseHandle( handle ) ; |
| -} |
| - |
| -void Windows_Handle::operator=( HANDLE h ) |
| -{ |
| - this -> ~Windows_Handle() ; |
| - handle = h ; |
| - validate_handle() ; |
| -} |
| - |
| -void Windows_Handle::validate_handle() |
| -{ |
| - if ( handle == INVALID_HANDLE_VALUE ) |
| - { |
| - throw std::runtime_error( "Invalid handle" ) ; |
| - } |
| -} |
| - |
| -//------------------------------------------------------- |
| // process_by_name_CI |
| //------------------------------------------------------- |
| process_by_name_CI::process_by_name_CI( const wchar_t * name ) |
| @@ -131,7 +103,7 @@ |
| { |
| // Assert GetWindowThreadProcessId returned an error |
| // If the window handle is invalid, we end up here. |
| - throw std::runtime_error( "" ) ; |
| + throw windows_api_error( "GetWindowThreadProcessId", r ) ; |
| } |
| return pid ; |
| } |