Wraps the windows functions as an interface so that they can be easily mocked and tested.
More...
|
| | WindowsInterface () |
| | Create a new Windows interface. More...
|
| |
| | WindowsInterface (const WindowsInterface &)=delete |
| | No copy. More...
|
| |
| | WindowsInterface (WindowsInterface &&)=delete |
| | No move. More...
|
| |
| virtual bool | CreateProcess (const char *application_name, char *command_line, SECURITY_ATTRIBUTES *proc_attr, SECURITY_ATTRIBUTES *thread_atttr, bool inherit_handles, DWORD creation_flags, void *env, const char *current_dir, STARTUPINFO *startup_info, PROCESS_INFORMATION *proc_info) const |
| | CreateProcess More...
|
| |
| virtual HANDLE | CreateEvent (SECURITY_ATTRIBUTES *event_attributes, bool manual_reset, bool initial_state, char *name) const |
| | CreateEvent More...
|
| |
| virtual bool | CreatePipe (PHANDLE read_pipe, PHANDLE write_pipe, LPSECURITY_ATTRIBUTES pipe_attr, DWORD size) const |
| | CreatePipe More...
|
| |
| virtual HANDLE | CreateNamedPipe (char *name, DWORD open_mode, DWORD pipe_mode, DWORD max_instances, DWORD out_buffer_size, DWORD in_buffer_size, DWORD default_time_out, LPSECURITY_ATTRIBUTES security_attributes) const |
| | CreateNamedPipe More...
|
| |
| virtual HANDLE | CreateFile (char *file_name, DWORD desired_access, DWORD share_mode, LPSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD flags_and_attributes, HANDLE template_file) const |
| | CreateFile More...
|
| |
| virtual HANDLE | CreateMutex (LPSECURITY_ATTRIBUTES attributes, bool initial_owner, LPCTSTR name) const |
| | CreateMutex More...
|
| |
| virtual HANDLE | OpenMutex (DWORD desired_access, bool inherit, LPCTSTR name) const |
| | OpenMutex More...
|
| |
| virtual bool | SetEvent (HANDLE handle) const |
| | SetEvent More...
|
| |
| virtual bool | ResetEvent (HANDLE handle) const |
| | ResetEvent More...
|
| |
| virtual bool | ConnectNamedPipe (HANDLE handle, LPOVERLAPPED overlapped) const |
| | ConnectNamedPipe More...
|
| |
| virtual bool | DisconnectNamedPipe (HANDLE handle) const |
| | ConnectNamedPipe More...
|
| |
| virtual bool | GetOverlappedResult (HANDLE handle, LPOVERLAPPED overlapped, LPDWORD bytes, BOOL wait) const |
| | GetOverlappedResult More...
|
| |
| virtual bool | ReadFile (HANDLE handle, LPVOID buffer, DWORD to_read, LPDWORD read, LPOVERLAPPED overlapped) const |
| | ReadFile More...
|
| |
| virtual bool | WriteFile (HANDLE handle, LPCVOID buffer, DWORD to_write, LPDWORD written, LPOVERLAPPED overlapped) const |
| | WriteFile More...
|
| |
| virtual DWORD | WaitForSingleObject (HANDLE handle, DWORD timeout) const |
| | WaitForSingleObject More...
|
| |
| virtual DWORD | WaitForMultipleObjects (DWORD handles_count, const HANDLE *handles, bool wait_all, DWORD timeout) const |
| | WaitForMultipleObjects More...
|
| |
| virtual bool | DuplicateHandle (HANDLE source_process_handle, HANDLE source_handle, HANDLE target_process_handle, LPHANDLE target_handle, DWORD desired_access, bool inherit_handle, DWORD options) const |
| | DuplicateHandle More...
|
| |
| virtual bool | SetHandleInformation (HANDLE object, DWORD mask, DWORD flags) const |
| | SetHandleInformation More...
|
| |
| virtual HANDLE | GetStdHandle (DWORD std_handle) const |
| | GetStdHandle More...
|
| |
| virtual bool | ReleaseMutex (HANDLE mutex) const |
| | ReleaseMutex More...
|
| |
| virtual bool | CloseHandle (HANDLE handle) const |
| | CloseHandle More...
|
| |
| virtual bool | GenerateConsoleCtrlEvent (DWORD ctrl_event, DWORD proc_group_id) const |
| | GenerateConsoleCtrlEvent More...
|
| |
| virtual bool | GetExitCodeProcess (HANDLE handle, DWORD *exit_code) const |
| | GetExitCodeProcess More...
|
| |
| virtual HANDLE | GetCurrentProcess () const |
| | GetCurrentProcess More...
|
| |
| virtual bool | TerminateProcess (HANDLE process, UINT exit_code) const |
| | TerminateProcess More...
|
| |
| virtual DWORD | GetLastError () const |
| | GetLastError More...
|
| |
| virtual bool | SetEnvironmentVariable (LPCTSTR name, LPCTSTR value) const |
| | SetEnvironmentVariable More...
|
| |
| virtual DWORD | GetEnvironmentVariable (LPCTSTR name, LPTSTR buffer, DWORD size) const |
| | GetEnvironmentVariable More...
|
| |
| virtual DWORD | ExpandEnvironmentStrings (LPCTSTR src, LPTSTR dst, DWORD size) const |
| | ExpandEnvironmentStrings More...
|
| |
| virtual LPTCH | GetEnvironmentStrings () const |
| | GetEnvironmentStrings More...
|
| |
| virtual bool | FreeEnvironmentStrings (LPTCH lpszEnvironmentBlock) const |
| | FreeEnvironmentStrings More...
|
| |
| virtual bool | SetConsoleCtrlHandler (PHANDLER_ROUTINE handler, bool add) const |
| | SetConsoleCtrlHandler More...
|
| |
| virtual RPC_STATUS | UuidCreateSequential (GUID *uuid) const |
| | UuidCreateSequential More...
|
| |
| virtual RPC_STATUS | UuidCreateNil (GUID *uuid) const |
| | UuidCreateNil More...
|
| |
| virtual RPC_STATUS | UuidCompare (GUID *uuid1, GUID *uuid2, RPC_STATUS *status) const |
| | UuidCompare More...
|
| |
| virtual RPC_STATUS | UuidToString (const GUID *uuid, unsigned char **string_uuid) const |
| | UuidToString More...
|
| |
| virtual RPC_STATUS | UuidFromString (unsigned char *string_uuid, GUID *uuid) const |
| | UuidFromString More...
|
| |
| virtual RPC_STATUS | RpcStringFree (unsigned char **rpc_string) const |
| | RpcStringFree More...
|
| |
| virtual bool | CryptAcquireContext (HCRYPTPROV *csp, LPCTSTR container, LPCTSTR provider, DWORD type, DWORD flags) const |
| | CryptAcquireContext More...
|
| |
| virtual bool | CryptCreateHash (HCRYPTPROV csp, ALG_ID algorithm, HCRYPTKEY key, DWORD flags, HCRYPTHASH *hash) const |
| | CryptCreateHash More...
|
| |
| virtual bool | CryptHashData (HCRYPTHASH hash, unsigned char *data, DWORD length, DWORD flags) const |
| | CryptHashData More...
|
| |
| virtual bool | CryptGetHashParam (HCRYPTHASH hash, DWORD param, unsigned char *data, DWORD *length, DWORD flags) const |
| | CryptGetHashParam More...
|
| |
| virtual bool | CryptDestroyHash (HCRYPTHASH hash) const |
| | CryptDestroyHash More...
|
| |
| virtual bool | CryptReleaseContext (HCRYPTPROV csp, DWORD flags) const |
| | CryptReleaseContext More...
|
| |
| WindowsInterface & | operator= (const WindowsInterface &)=delete |
| | No copy. More...
|
| |
| WindowsInterface & | operator= (WindowsInterface &&)=delete |
| | No move. More...
|
| |
Wraps the windows functions as an interface so that they can be easily mocked and tested.