Changeset 62792 in vbox for trunk/src/VBox/HostServices/SharedClipboard
- Timestamp:
- Aug 1, 2016 7:21:13 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 109379
- Location:
- trunk/src/VBox/HostServices/SharedClipboard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp
r62679 r62792 1091 1091 1092 1092 /* 1093 * Converts clipboard data from CF_HTML format to mimie clipboard format1094 * Returns allocated buffer that contains html converted to text/html mime type1095 * return result code1096 * parameters - output buffer and size of output buffer1097 * It allocates the buffer needed for storing converted fragment1098 * Allocated buffer should be destroyed by RTMemFree after usage1099 */1100 int ConvertCFHtmlToMime(const char *pcszSource, const uint32_t cch, char **ppszOutput, size_t *pc Ch)1093 * Converts clipboard data from CF_HTML format to mimie clipboard format 1094 * Returns allocated buffer that contains html converted to text/html mime type 1095 * return result code 1096 * parameters - output buffer and size of output buffer 1097 * It allocates the buffer needed for storing converted fragment 1098 * Allocated buffer should be destroyed by RTMemFree after usage 1099 */ 1100 int ConvertCFHtmlToMime(const char *pcszSource, const uint32_t cch, char **ppszOutput, size_t *pcch) 1101 1101 { 1102 1102 char* result = NULL; … … 1105 1105 Assert(cch); 1106 1106 Assert(ppszOutput); 1107 Assert(pc Ch);1107 Assert(pcch); 1108 1108 1109 1109 size_t cStartOffset, cEndOffset; … … 1123 1123 { 1124 1124 size_t cSubstrlen = cEndOffset - cStartOffset; 1125 result = (char *)RTMemAlloc(cSubstrlen + 1);1125 result = (char *)RTMemAlloc(cSubstrlen + 1); 1126 1126 if (result) 1127 1127 { … … 1131 1131 { 1132 1132 *ppszOutput = result; 1133 *pc Ch = cSubstrlen + 1;1133 *pcch = cSubstrlen + 1; 1134 1134 } 1135 1135 else … … 1167 1167 * @note: Everything inside of fragment can be UTF8. Windows allows it. Everything in header should be Latin1. 1168 1168 */ 1169 int ConvertMimeToCFHTML(const char *pcszSource, size_t cb, char **p cszOutput, size_t *pcCh)1170 { 1171 Assert(p cszOutput);1172 Assert(pc Ch);1169 int ConvertMimeToCFHTML(const char *pcszSource, size_t cb, char **pszOutput, size_t *pcch) 1170 { 1171 Assert(pszOutput); 1172 Assert(pcch); 1173 1173 Assert(pcszSource); 1174 1174 Assert(cb); … … 1223 1223 #endif 1224 1224 1225 *p cszOutput = pszResult;1226 *pc Ch = rc+1;1225 *pszOutput = pszResult; 1226 *pcch = rc + 1; 1227 1227 1228 1228 return VINF_SUCCESS; -
trunk/src/VBox/HostServices/SharedClipboard/service.cpp
r62489 r62792 780 780 int rc = SSMR3PutStructEx (pSSM, pClient, sizeof(*pClient), 0 /*fFlags*/, &g_aClipboardClientDataFields[0], NULL); 781 781 AssertRCReturn (rc, rc); 782 #endif /* !UNIT_TEST */ 782 783 #else /* UNIT_TEST */ 784 RT_NOREF3(u32ClientID, pvClient, pSSM); 785 #endif /* UNIT_TEST */ 783 786 return VINF_SUCCESS; 784 787 } … … 849 852 AssertRCReturn (rc, rc); 850 853 } 851 else if (lenOrVer == (SSMR3HandleHostBits (pSSM) == 64 ? 72 : 48))854 else if (lenOrVer == (SSMR3HandleHostBits (pSSM) == 64 ? 72U : 48U)) 852 855 { 853 856 /** … … 899 902 vboxClipboardSync (pClient); 900 903 901 #endif /* !UNIT_TEST */ 904 #else /* UNIT_TEST*/ 905 RT_NOREF3(u32ClientID, pvClient, pSSM); 906 #endif /* UNIT_TEST */ 902 907 return VINF_SUCCESS; 903 908 } … … 905 910 static DECLCALLBACK(int) extCallback (uint32_t u32Function, uint32_t u32Format, void *pvData, uint32_t cbData) 906 911 { 912 RT_NOREF2(pvData, cbData); 907 913 if (g_pClient != NULL) 908 914 {
Note:
See TracChangeset
for help on using the changeset viewer.