Lines Matching refs:pBytes
27 static ENCODING AnalyzeEncoding(const BYTE *pBytes, DWORD dwSize) in AnalyzeEncoding() argument
31 if (IsTextNonZeroASCII(pBytes, dwSize)) in AnalyzeEncoding()
34 if (IsTextUnicode(pBytes, dwSize, &flags)) in AnalyzeEncoding()
41 if (MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, (LPCSTR)pBytes, dwSize, NULL, 0)) in AnalyzeEncoding()
155 LPBYTE pBytes = NULL; in ReadText() local
189 pBytes = MapViewOfFile(hMapping, FILE_MAP_READ, 0, 0, dwSize); in ReadText()
190 if (!pBytes) in ReadText()
195 if ((dwSize >= 2) && (pBytes[0] == 0xFF) && (pBytes[1] == 0xFE)) in ReadText()
200 else if ((dwSize >= 2) && (pBytes[0] == 0xFE) && (pBytes[1] == 0xFF)) in ReadText()
205 else if ((dwSize >= 3) && (pBytes[0] == 0xEF) && (pBytes[1] == 0xBB) && (pBytes[2] == 0xBF)) in ReadText()
212 encFile = AnalyzeEncoding(pBytes, dwSize); in ReadText()
221 pszText = (LPWSTR) &pBytes[dwPos]; in ReadText()
255 … cchText = MultiByteToWideChar(iCodePage, 0, (LPCSTR)&pBytes[dwPos], (INT)cbContent, NULL, 0); in ReadText()
270 if (!MultiByteToWideChar(iCodePage, 0, (LPCSTR)&pBytes[dwPos], (INT)cbContent, in ReadText()
291 if (pBytes) in ReadText()
292 UnmapViewOfFile(pBytes); in ReadText()
302 LPBYTE pBytes = NULL; in WriteEncodedText() local
318 pBytes = (LPBYTE) &pszText[dwPos]; in WriteEncodedText()
335 pBytes = (LPBYTE) &buffer[dwPos]; in WriteEncodedText()
354 pBytes = buffer; in WriteEncodedText()
362 pBytes = pAllocBuffer; in WriteEncodedText()
366 …harToMultiByte(iCodePage, 0, &pszText[dwPos], dwTextLen - dwPos, (LPSTR) pBytes, iBufferSize, NULL… in WriteEncodedText()
377 if (!WriteFile(hFile, pBytes, dwByteCount, &dwDummy, NULL)) in WriteEncodedText()