SetClipboardData() expects its second parameter to be allocated with the GMEM_MOVEABLE flag (see here) and will call GlobalSize() on it internally, so we can't replace it with a plain malloc.
Also the assignment of h_text to ptr was missing, and GlobalUnlock() was still called on h_text even after the change to malloc.
Related Issues
Regression introduced in c41c3a7 by #436.
Screenshots (if applicable)
Checklist
[x] I have tested my changes locally and verified that they work as intended.
[x] I have documented any new or modified functionality.
[x] I have reviewed the changes to ensure they do not introduce any unnecessary complexity or duplicate code.
[x] I understand that by submitting this pull request, I am agreeing to license my contributions under the project's license.
Pull Request Type
Description
SetClipboardData()
expects its second parameter to be allocated with theGMEM_MOVEABLE
flag (see here) and will callGlobalSize()
on it internally, so we can't replace it with a plain malloc. Also the assignment ofh_text
toptr
was missing, andGlobalUnlock()
was still called on h_text even after the change to malloc.Related Issues
Regression introduced in c41c3a7 by #436.
Screenshots (if applicable)
Checklist
Additional Comments