21#ifndef PDFTOOLS_PDFTOOLSSYS_H__
22#define PDFTOOLS_PDFTOOLSSYS_H__
25#ifndef NO_FILE_STREAM_DESCRIPTOR
35#define PdfToolsSys_PathStreamDescriptor_Create PdfToolsSys_PathStreamDescriptor_CreateW
37#define PdfToolsSys_PathStreamDescriptor_Create PdfToolsSys_PathStreamDescriptor_CreateA
43typedef size_t(
STDCALL*
TRead)(
void* handle,
void* pData,
size_t nSize);
44typedef size_t(
STDCALL*
TWrite)(
void* handle,
const void* pData,
size_t nSize);
81#ifndef NO_FILE_STREAM_DESCRIPTOR
95 iPos = ftell((FILE*)handle);
98 if (fseek((FILE*)handle, 0L, SEEK_END) != 0)
100 nLen = ftell((FILE*)handle);
101 if (fseek((FILE*)handle, (
long)iPos, SEEK_SET) != 0)
115 return fseek((FILE*)handle, (
long)iPos, SEEK_SET) == 0 ? 1 : 0;
136 size_t nRead = fread(pData, 1, nSize, (FILE*)handle);
137 if (nRead != nSize && ferror((FILE*)handle) != 0)
152 if (fwrite(pData, 1, nSize, (FILE*)handle) != nSize)
198 const char* szPath,
BOOL bIsReadOnly);