2018-11-23 04:53:32 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
namespace Util
|
|
|
|
{
|
2018-11-28 04:54:04 +08:00
|
|
|
struct NamedPipeHandleCloser { void operator()(void* h) { DisconnectNamedPipe(h); CloseHandle(h); } };
|
|
|
|
std::optional<std::wstring> GetModuleFileName(DWORD processId, HMODULE module = NULL);
|
|
|
|
std::optional<std::wstring> GetModuleFileName(HMODULE module = NULL);
|
2018-11-23 04:53:32 +08:00
|
|
|
std::optional<std::wstring> GetClipboardText();
|
2018-11-26 05:23:41 +08:00
|
|
|
std::optional<std::wstring> StringToWideString(std::string text, UINT encoding = CP_UTF8);
|
2018-11-23 05:02:45 +08:00
|
|
|
// return true if repetition found (see https://github.com/Artikash/Textractor/issues/40)
|
|
|
|
bool RemoveRepetition(std::wstring& text);
|
2018-11-23 04:53:32 +08:00
|
|
|
}
|