MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetRawData

Method GetRawData

Source/Engine/Platform/Windows/WindowsClipboard.cpp:107–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107Array<byte> WindowsClipboard::GetRawData()
108{
109 Array<byte> result;
110 OpenClipboard(nullptr);
111 HANDLE hMem = GetClipboardData(CF_PENDATA);
112 if (hMem)
113 {
114 auto data = GlobalLock(hMem);
115 auto size = static_cast<int32>(GlobalSize(hMem));
116
117 if (size > 0)
118 {
119 result.Set(static_cast<byte*>(data), size);
120 }
121
122 GlobalUnlock(data);
123 }
124 CloseClipboard();
125 return result;
126}
127
128Array<String> WindowsClipboard::GetFiles()
129{

Callers

nothing calls this directly

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected