MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / OnCopyAll

Method OnCopyAll

Ext2Mgr/Ext2MgrDlg.cpp:1619–1644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1617}
1618
1619void CExt2MgrDlg::OnCopyAll()
1620{
1621 BOOL rc = FALSE;
1622 CString s;
1623
1624 s = Ext2SysInformation();
1625
1626 if (!s.IsEmpty() && OpenClipboard()) {
1627
1628 HGLOBAL clipbuffer;
1629 char * buffer;
1630 clipbuffer = GlobalAlloc(GMEM_DDESHARE, s.GetLength() + 1);
1631 if (clipbuffer) {
1632 buffer = (char*)GlobalLock(clipbuffer);
1633 if (buffer) {
1634 EmptyClipboard();
1635 memcpy(buffer, (LPCSTR)s, s.GetLength() + 1);
1636 GlobalUnlock(clipbuffer);
1637 SetClipboardData(CF_TEXT,clipbuffer);
1638 } else {
1639 GlobalFree(clipbuffer);
1640 }
1641 }
1642 CloseClipboard();
1643 }
1644}
1645
1646void CExt2MgrDlg::OnTimer(UINT_PTR nIDEvent)
1647{

Callers

nothing calls this directly

Calls 1

Ext2SysInformationFunction · 0.85

Tested by

no test coverage detected