mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-24 01:14:12 +08:00
15 lines
594 B
C++
15 lines
594 B
C++
#pragma once
|
|
|
|
#include "common.h"
|
|
|
|
namespace Util
|
|
{
|
|
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);
|
|
std::optional<std::wstring> GetClipboardText();
|
|
std::optional<std::wstring> StringToWideString(std::string text, UINT encoding = CP_UTF8);
|
|
// return true if repetition found (see https://github.com/Artikash/Textractor/issues/40)
|
|
bool RemoveRepetition(std::wstring& text);
|
|
}
|