summaryrefslogtreecommitdiff
path: root/plugins/CrashDumper
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-09-26 19:16:12 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-09-26 19:16:12 +0300
commitc5dc28ec2272a865ef2f28fd7ab151b55517fedf (patch)
treed751f3e869c66371b8f1d65480b39c2997ba6e62 /plugins/CrashDumper
parentdc2a4dc50d6cc3e7bd513122756dd39141d7887e (diff)
more clipboard shit removed
Diffstat (limited to 'plugins/CrashDumper')
-rw-r--r--plugins/CrashDumper/src/crshdmp.cpp3
-rw-r--r--plugins/CrashDumper/src/dumper.cpp2
-rw-r--r--plugins/CrashDumper/src/stdafx.h1
-rw-r--r--plugins/CrashDumper/src/utils.cpp19
4 files changed, 2 insertions, 23 deletions
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp
index d204008dc1..5f0c12869b 100644
--- a/plugins/CrashDumper/src/crshdmp.cpp
+++ b/plugins/CrashDumper/src/crshdmp.cpp
@@ -92,8 +92,7 @@ INT_PTR StoreVersionInfoToClipboard(WPARAM, LPARAM lParam)
PrintVersionInfo(buffer, (unsigned int)lParam | VI_FLAG_PRNVAR | VI_FLAG_FORMAT);
WriteBBFile(buffer, false);
- StoreStringToClip(buffer);
-
+ Utils_ClipboardCopy(buffer);
return 0;
}
diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp
index d4ae642135..c4c3b9f815 100644
--- a/plugins/CrashDumper/src/dumper.cpp
+++ b/plugins/CrashDumper/src/dumper.cpp
@@ -609,5 +609,5 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const wcha
free(dst);
if (g_plugin.getByte("ShowCrashMessageBox", 1) && msg && IDYES == MessageBox(nullptr, msg, L"Miranda Crash Dumper", MB_YESNO | MB_ICONERROR | MB_TASKMODAL | MB_DEFBUTTON2 | MB_TOPMOST))
- StoreStringToClip(buffer);
+ Utils_ClipboardCopy(buffer);
}
diff --git a/plugins/CrashDumper/src/stdafx.h b/plugins/CrashDumper/src/stdafx.h
index 78db36af2a..dfe9421cb0 100644
--- a/plugins/CrashDumper/src/stdafx.h
+++ b/plugins/CrashDumper/src/stdafx.h
@@ -128,7 +128,6 @@ void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMStringW& buffer);
void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, uint32_t dwSize);
void GetLastWriteTime(FILETIME* ftime, LPTSTR lpszString, uint32_t dwSize);
-void StoreStringToClip(CMStringW& buffer);
void ShowMessage(int type, const wchar_t* format, ...);
const PLUGININFOEX* GetMirInfo(HMODULE hModule);
diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp
index 055ee355a3..54b4e2a2d2 100644
--- a/plugins/CrashDumper/src/utils.cpp
+++ b/plugins/CrashDumper/src/utils.cpp
@@ -396,22 +396,3 @@ void GetVersionInfo(HMODULE hLib, CMStringW& buffer)
}
}
}
-
-void StoreStringToClip(CMStringW& buffer)
-{
- int bufLen = (buffer.GetLength() + 1) * sizeof(wchar_t);
- HANDLE hData = GlobalAlloc(GMEM_MOVEABLE, bufLen);
- LPSTR buf = (LPSTR)GlobalLock(hData);
-
- memcpy(buf, buffer.c_str(), bufLen);
-
- GlobalUnlock(hData);
-
- if(OpenClipboard(nullptr)) {
- EmptyClipboard();
-
-
- SetClipboardData(CF_UNICODETEXT, hData);
- CloseClipboard();
- }
-}