| 863 | } |
| 864 | |
| 865 | static bool watcher_windows_copy_self(const char *destination) { |
| 866 | wchar_t source[32768]; |
| 867 | DWORD source_length = |
| 868 | GetModuleFileNameW(NULL, source, (DWORD)(sizeof(source) / sizeof(source[0]))); |
| 869 | wchar_t *destination_wide = cbm_utf8_to_wide(destination); |
| 870 | bool copied = source_length > 0 && |
| 871 | source_length < (DWORD)(sizeof(source) / sizeof(source[0])) && destination_wide && |
| 872 | CopyFileW(source, destination_wide, TRUE) != 0; |
| 873 | free(destination_wide); |
| 874 | return copied; |
| 875 | } |
| 876 | |
| 877 | static bool watcher_windows_capture_image_identity(const char *path, |
| 878 | watcher_windows_image_identity_t *identity) { |
no test coverage detected