| 255 | } |
| 256 | |
| 257 | bool HookProcessor::PushData(int data_size, |
| 258 | void* pointer_to_data) { |
| 259 | LOG(TRACE) << "Entering HookProcessor::PushData"; |
| 260 | if (this->hook_procedure_handle_ == NULL) { |
| 261 | LOG(WARN) << "No hook procedure has been set"; |
| 262 | return false; |
| 263 | } |
| 264 | CopyDataHolderWindow holder; |
| 265 | holder.Create(/*HWND*/ HWND_MESSAGE, |
| 266 | /*_U_RECT rect*/ CWindow::rcDefault, |
| 267 | /*LPCTSTR szWindowName*/ NULL, |
| 268 | /*DWORD dwStyle*/ NULL, |
| 269 | /*DWORD dwExStyle*/ NULL, |
| 270 | /*_U_MENUorID MenuOrID*/ 0U, |
| 271 | /*LPVOID lpCreateParam*/ NULL); |
| 272 | LRESULT result = holder.CopyData(this->window_handle_, |
| 273 | data_size, |
| 274 | pointer_to_data); |
| 275 | holder.DestroyWindow(); |
| 276 | return true; |
| 277 | } |
| 278 | |
| 279 | bool HookProcessor::PushData(const std::wstring& data) { |
| 280 | std::wstring mutable_data = data; |
no test coverage detected