UWPHook icon indicating copy to clipboard operation
UWPHook copied to clipboard

Copying icons to %APPDATA%

Open DragRedSim opened this issue 2 years ago • 1 comments

Hi there, I've done some digging on how to get the copying to work a bit better, especially in regards from copying from an EFS-encrypted location to a non-encrypted location. The trick appears to be using the CopyFileExW function, which allows a lot of things; cancelling a copy in progress, progress status callbacks, and most importantly for us, the ability to use some flags to modify its behaviour. The catch is, it needs to be brought in via P/Invoke. Using the flag COPY_FILE_ALLOW_DECRYPTED_DESTINATION (an enum value resolving to 0x8) will allow the copy to succeed without throwing an error. Here's the official documentation on this function: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-copyfileexw Unfortunately, I don't know enough about coding with this functionality to get it cleanly together. I managed to hack together a working version using a decompiler on top of 2.11.0.

DragRedSim avatar Sep 20 '22 13:09 DragRedSim

Will just read the file as an Image and save it. More easier to manage and will solve this issue :). (merge inc after tests by other peoples but mine are ok)

stevealexandre avatar Sep 20 '22 20:09 stevealexandre