16#ifndef PDFTOOLS_PDFTOOLSSYS_H__
17#define PDFTOOLS_PDFTOOLSSYS_H__
20#ifndef NO_FILE_STREAM_DESCRIPTOR
30#define PdfToolsSys_PathStreamDescriptor_Create PdfToolsSys_PathStreamDescriptor_CreateW
32#define PdfToolsSys_PathStreamDescriptor_Create PdfToolsSys_PathStreamDescriptor_CreateA
38typedef size_t(
STDCALL*
TRead)(
void* handle,
void* pData,
size_t nSize);
39typedef size_t(
STDCALL*
TWrite)(
void* handle,
const void* pData,
size_t nSize);
76#ifndef NO_FILE_STREAM_DESCRIPTOR
90 iPos = ftell((FILE*)handle);
93 if (fseek((FILE*)handle, 0L, SEEK_END) != 0)
95 nLen = ftell((FILE*)handle);
96 if (fseek((FILE*)handle, (
long)iPos, SEEK_SET) != 0)
110 return fseek((FILE*)handle, (
long)iPos, SEEK_SET) == 0 ? 1 : 0;
131 size_t nRead = fread(pData, 1, nSize, (FILE*)handle);
132 if (nRead != nSize && ferror((FILE*)handle) != 0)
147 if (fwrite(pData, 1, nSize, (FILE*)handle) != nSize)
193 const char* szPath,
BOOL bIsReadOnly);