Changeset 81321 in vbox
- Timestamp:
- Oct 17, 2019 2:46:33 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp
r81319 r81321 1128 1128 { 1129 1129 /* Allocate enough space (including terminator). */ 1130 pszFileUtf8 = (char *)RTMemAlloc((cchFile + 1) * sizeof(char)); 1131 if (pszFileUtf8) 1130 char *pszFileANSI = (char *)RTMemAlloc((cchFile + 1) * sizeof(char)); 1131 UINT cchFileANSI = 0; 1132 if (pszFileANSI) 1132 1133 { 1133 cchFileUtf8 = DragQueryFileA(hDrop, i /* File index */, 1134 pszFileUtf8, cchFile + 1 /* Include terminator */); 1135 1136 AssertMsg(cchFileUtf8 == cchFile, ("cchFileUtf8 (%RU16) does not match cchFile (%RU16)\n", 1137 cchFileUtf8, cchFile)); 1134 cchFileANSI = DragQueryFileA(hDrop, i /* File index */, 1135 pszFileANSI, cchFile + 1 /* Include terminator */); 1136 1137 AssertMsg(cchFileANSI == cchFile, ("cchFileANSI (%RU16) does not match cchFile (%RU16)\n", 1138 cchFileANSI, cchFile)); 1139 1140 /* Convert the ANSI codepage to UTF-8. */ 1141 rc = RTStrCurrentCPToUtf8(&pszFileUtf8, pszFileANSI); 1142 if (RT_SUCCESS(rc)) 1143 { 1144 cchFileUtf8 = (UINT)strlen(pszFileUtf8); 1145 } 1138 1146 } 1139 1147 else
Note:
See TracChangeset
for help on using the changeset viewer.