14#if defined(OWL5_COMPAT)
18#if defined(__BORLANDC__)
54 TXOwl(IDS_BADFILEFORMAT)
94 access |= GENERIC_READ;
96 access |= GENERIC_WRITE;
101 sharedMode |= FILE_SHARE_READ;
103 sharedMode |= FILE_SHARE_WRITE;
109 howOpen |= CREATE_NEW ;
111 howOpen |= CREATE_ALWAYS;
113 howOpen |= OPEN_EXISTING;
115 howOpen |= TRUNCATE_EXISTING;
130 sys2Mode(Access, ShareMode, HowOpen,
OpenMode);
132 uint32 flags = FILE_FLAG_RANDOM_ACCESS;
133 Handle = ::CreateFile(
FileName.c_str(),Access,ShareMode,
nullptr,HowOpen,flags,
nullptr);
150 if(::DuplicateHandle(::GetCurrentProcess(),
Handle,
151 ::GetCurrentProcess(), &hHandle,
152 0,
false, DUPLICATE_SAME_ACCESS) && hHandle)
161 return ::GetLastError();
168 if(!::CloseHandle(
Handle))
178 if(::ReadFile(
Handle, buffer, numBytes, &u32Ret,
nullptr))
188 if(::WriteFile(
Handle, buffer, numBytes, &u32ret,
nullptr))
199 if(::SetEndOfFile(
Handle))
217 ul.Lo = ::GetFileSize(
Handle,
reinterpret_cast<DWORD *
>(&ul.Hi));
218 return *
reinterpret_cast<uint64*
>(&ul);
227 if(::SetEndOfFile(
Handle))
237 if( ret != 0xFFFFFFFF)
247 if( ret != 0xFFFFFFFF)
255 __i_int32_32 ul = *
reinterpret_cast<__i_int32_32*
>(&offset);
256 ul.Lo = ::SetFilePointer(
Handle,ul.Lo,
reinterpret_cast<LONG*
>(&ul.Hi),
static_cast<uint32>(origin));
264 if( ret != 0xFFFFFFFF)
273 if(::FlushFileBuffers(
Handle))
281 return ::LockFile(
Handle,position,0, count,0);
287 if(::UnlockFile(
Handle,position, 0, count, 0))
295 __i_uint32_32 up = *
reinterpret_cast<__i_uint32_32*
>(&position);
296 __i_uint32_32 uc = *
reinterpret_cast<__i_uint32_32*
>(&count);
297 return ::LockFile(
Handle, up.Lo,up.Hi,uc.Lo,uc.Hi);
302 __i_uint32_32 up = *
reinterpret_cast<__i_uint32_32*
>(&position);
303 __i_uint32_32 uc = *
reinterpret_cast<__i_uint32_32*
>(&count);
304 return ::UnlockFile(
Handle, up.Lo,up.Hi, uc.Lo,uc.Hi);
315 if(attrib & FILE_ATTRIBUTE_ARCHIVE)
317 if(attrib & FILE_ATTRIBUTE_DIRECTORY)
319 if(attrib & FILE_ATTRIBUTE_HIDDEN)
321 if(attrib & FILE_ATTRIBUTE_NORMAL)
323 if(attrib & FILE_ATTRIBUTE_READONLY)
325 if(attrib & FILE_ATTRIBUTE_SYSTEM)
327 if(attrib & FILE_ATTRIBUTE_TEMPORARY)
335 attr |= FILE_ATTRIBUTE_ARCHIVE;
337 attr |= FILE_ATTRIBUTE_DIRECTORY;
339 attr |= FILE_ATTRIBUTE_HIDDEN;
341 attr |= FILE_ATTRIBUTE_NORMAL;
343 attr |= FILE_ATTRIBUTE_READONLY;
345 attr |= FILE_ATTRIBUTE_SYSTEM;
347 attr |= FILE_ATTRIBUTE_TEMPORARY;
372 if(::GetFileTime(
Handle, &ftCreate, &ftAccess, &ftWrite) == FALSE)
486 memcpy(dst, src, count*size);
490static int binCVTShortMBF(
uint8* _src,
uint8* _dst,
int ,
int size,
int count)
492 int retval = count*size;
501static int binCVTLongMBF(
uint8* _src,
uint8* _dst,
int ,
int size,
int count)
503 int retval = count*size;
512static int binCVTFloatMBF (
uint8* _src,
uint8* _dst,
int ,
int size,
int count)
514 int retval = count*size;
523static int binCVTDoubleMBF (
uint8*,
uint8*,
int,
int,
int)
528static int binCVTInt64MBF (
uint8* _src,
uint8* _dst,
int ,
int size,
int count)
530 int retval = count*size;
531 __i_uint32_32* src =
reinterpret_cast<__i_uint32_32*
>(_src);
532 __i_uint32_32* dst =
reinterpret_cast<__i_uint32_32*
>(_dst);
544 memcpy(dst, src, count*size);
548static int binCVTShortLBF (
uint8* _src,
uint8* _dst,
int ,
int size,
int count)
550 int retval = count*size;
559static int binCVTLongLBF (
uint8* _src,
uint8* _dst,
int ,
int size,
int count)
561 int retval = count*size;
570static int binCVTFloatLBF (
uint8* _src,
uint8* _dst,
int ,
int size,
int count)
572 int retval = count*size;
581static int binCVTDoubleLBF (
uint8*,
uint8*,
int,
int,
int)
586static int binCVTInt64LBF (
uint8* _src,
uint8* _dst,
int ,
int size,
int count)
588 int retval = count*size;
589 __i_uint32_32* src =
reinterpret_cast<__i_uint32_32*
>(_src);
590 __i_uint32_32* dst =
reinterpret_cast<__i_uint32_32*
>(_dst);
644#define BINCHECKRTYPE(type) \
645 if ( (type) <= 0 || (type) > varLastMember) \
648#define BINCHECKWTYPE(type) \
649 if ((type) <= 0 || (type) > varLastMember) \
652#define BINCHECKNBYTES(nBytes) \
661 count += bfp->Count*bfp->Bytes;
678 for(bfp = fields; bfp->
Count; bfp++ ) {
687 return static_cast<uint>(
Read(buffer, count));
691 binReadDisp = dispatchMBF;
693 binReadDisp = dispatchLBF;
710 for(bfp = fields; bfp->
Count; bfp++ ){
711 dispatch = binReadDisp[bfp->
Type];
712 if ((n = (*dispatch)(curBuffer,
static_cast<uint8*
>(buffer), bfp->
Type, bfp->
Bytes, bfp->
Count)) == -1)
733 for(bfp = fields; bfp->
Count; bfp++ ) {
742 return Write(buffer, count);
746 binReadDisp = dispatchMBF;
748 binReadDisp = dispatchLBF;
762 for(bfp = fields; bfp->
Count; bfp++ ){
763 dispatch = binReadDisp[bfp->
Type];
764 if ((n = (*dispatch)(
static_cast<uint8*
>(buffer), curBuffer, bfp->
Type, bfp->
Bytes, bfp->
Count)) == -1)
786 for(bfp = fields; bfp->
Count; bfp++ ) {
795 memcpy(buffer, ReadBuf, count);
801 binReadDisp = dispatchMBF;
803 binReadDisp = dispatchLBF;
807 for(bfp = fields; bfp->
Count; bfp++ ){
808 dispatch = binReadDisp[bfp->
Type];
809 if ((n = (*dispatch)(curBuffer,
static_cast<uint8*
>(buffer), bfp->
Type, bfp->
Bytes, bfp->
Count)) == -1)
830 for(bfp = fields; bfp->
Count; bfp++ ) {
839 memcpy(OutBuf, buffer, count);
845 binReadDisp = dispatchMBF;
847 binReadDisp = dispatchLBF;
851 for(bfp = fields; bfp->
Count; bfp++ ){
852 dispatch = binReadDisp[bfp->
Type];
853 if ((n = (*dispatch)(
static_cast<uint8*
>(buffer), curBuffer, bfp->
Type, bfp->
Bytes, bfp->
Count)) == -1)
910 return ReadStruct(buffer, FieldTypes[btype], type);
916 return WriteStruct(buffer, FieldTypes[btype], type);
919#if defined(OWL5_COMPAT)
926 return TFileName(name).GetStatus(status);
933bool TFile::SetStatus(LPCTSTR name,
const TFileStatus & status)
935 return TFileName(name).SetStatus(status);
941 int size =
static_cast<int>(file.
readUint32());
946 s[size+1] =
_T(
'\0');
1079 WARNX(OwlFileSystem,1, 0,
"TBufferedFile::FlushBuffer() error Seek(), line: " << __LINE__);
1127 else if(origin ==
end)
1138 WARNX(OwlFileSystem,1, 0,
"TBufferedFile::Seek() error FlushBuffer(), line: " << __LINE__);
1149 WARNX(OwlFileSystem,1, 0,
"TBufferedFile::Seek() error Seek(), line: " << __LINE__);
1170 else if(origin ==
end)
1171 position =
Length() + offset;
1181 WARNX(OwlFileSystem,1, 0,
"TBufferedFile::Seek() error FlushBuffer(), line: " << __LINE__);
1192 WARNX(OwlFileSystem,1, 0,
"TBufferedFile::Seek() error Seek(), line: " << __LINE__);
1206 uint32 retval = numBytes;
1213 WARNX(OwlFileSystem,ret==
TFILE_ERROR, 0,
"TBufferedFile::Write() error Read(), line: " << __LINE__);
1221 while(numBytes > 0){
1223 if(numBytes > dataSize){
1225 memmove(data,
CurByte, dataSize);
1226 numBytes -= dataSize;
1233 WARNX(OwlFileSystem,ret==
TFILE_ERROR, 0,
"TBufferedFile::Write() error Read(), line: " << __LINE__);
1243 WARNX(OwlFileSystem,ret==
TFILE_ERROR, 0,
"TBufferedFile::Write() error Read(), line: " << __LINE__);
1253 size_t n = data -
static_cast<uint8*
>(buffer);
1254 return static_cast<uint32>(n);
1263 memmove(data,
CurByte, numBytes);
1287 WARNX(OwlFileSystem,1, 0,
"TBufferedFile::Write() error FlushBuffer(), line: " << __LINE__);
1298 uint8* data =
static_cast<uint8*
>(
const_cast<void*
>(buffer));
1299 while(numBytes > 0L){
1301 if( numBytes > freeSize ){
1302 memmove(
CurByte, data, freeSize);
1303 numBytes -= freeSize;
1307 WARNX(OwlFileSystem,1, 0,
"TBufferedFile::Write() error Write(), line: " << __LINE__);
1315 memmove(
CurByte, data, numBytes);
1342 LPTSTR str = buffer;
1343 LPTSTR Buff =
reinterpret_cast<LPTSTR
>(
CurByte);
1349 WARNX(OwlFileSystem,retval==
TFILE_ERROR,0,
_T(
"TTextFile::GetString() error Read(), line: ") << __LINE__);
1357 while(*Buff && *Buff !=
_T(
'\r') && *Buff !=
_T(
'\n') && length < size){
1362 if((retval ==
TFILE_ERROR || retval == 0) && length==0){
1363 WARNX(OwlFileSystem,retval==
TFILE_ERROR,0,
_T(
"TTextFile::GetString() error Read(), line: ") <<__LINE__);
1369 Buff =
reinterpret_cast<LPTSTR
>(
CurByte);
1375 LPTSTR p = CharNext(str);
1379 uint delta = p - Buff;
1388 if(*Buff ==
_T(
'\r')){
1392 if(*Buff ==
_T(
'\n')){
1401 return (*
CurByte || length) ? buffer :
nullptr;
1410 struct TTextFileGetString
1413 TTextFileGetString(
TTextFile& f_) : f(f_) {}
1414 int operator()(LPTSTR buf,
int bufSize)
1417 return r ? bufSize - 1 : 0;
1428 return CopyText(size, TTextFileGetString(*
this));
1516 _tprintf(buf,
_T(
"%d"), u);
1582#include <pshpack1.h>
1593static TBinField ChunkField[] = {
1628 chunk.CkId = info.
CkId;
1630 chunk.CkId = FOURCC_LIST;
1634 chunk.CkId = FOURCC_RIFF;
1638 chunk.Type = info.
Type;
1642 fields = ChunkField;
1645 WARNX(OwlFileSystem,1, 0,
"TRiffFile::CreateChunk() error WriteStruct(), line: " << __LINE__);
1662 long offset = info.
Offset -
sizeof(__TChunk) + 4;
1664 WARNX(OwlFileSystem,1, 0,
"TRiffFile::Ascent() error Seek(), line: " << __LINE__);
1669 chunk.CkId = info.
CkId;
1670 chunk.Type = info.
Type;
1671 chunk.Size = info.
Size;
1674 chunk.CkId = FOURCC_LIST;
1676 chunk.CkId = FOURCC_RIFF;
1683 WARNX(OwlFileSystem,1, 0,
"TRiffFile::Ascent() error WriteStruct(), line: " << __LINE__);
1691 WARNX(OwlFileSystem,1, 0,
"TRiffFile::Ascent() error Seek(), line: " << __LINE__);
1706 long offset = parent->
Offset;
1710 WARNX(OwlFileSystem,1, 0,
"TRiffFile::Descent() error Seek(), line: " << __LINE__);
1716 WARNX(OwlFileSystem,1, 0,
"TRiffFile::Descent() error SeekToBegin(), line: " << __LINE__);
1723 bool retval =
false;
1730 WARNX(OwlFileSystem,1, 0,
"TRiffFile::Descent() error ReadStruct(), line: " << __LINE__);
1734 fields = ChunkField1;
1739 if(riff == FOURCC_RIFF){
1742 fields = ListField1;
1744 else if(riff == FOURCC_LIST){
1747 fields = ListField1;
1751 WARNX(OwlFileSystem,1, 0,
"TRiffFile::Descent() error ReadStruct(), line: " << __LINE__);
1759 info.
Size = chunk.Size;
1763 info.
CkId = chunk.CkId;
1764 info.
Type = bRiff ? chunk.Type : 0;
1775 info.
Type = chunk.Type;
1776 info.
CkId = FOURCC_LIST;
1780 else if(flags &
ffFindRiff && chunk.CkId == FOURCC_RIFF){
1781 info.
Type = chunk.Type;
1782 info.
CkId = FOURCC_RIFF;
1804#if !defined(qtstruct_h)
1805#include <pshpack1.h>
1810static TBinField MacAtomFields[] = {
1833 WARNX(OwlFileSystem,1, 0,
"TQtFile::Descent() error seek line: " << __LINE__);
1837 position = parent->
Offset;
1842 WARNX(OwlFileSystem,1, 0,
"TQtFile::Descent() error seek to begin line: " << __LINE__);
1850 max_size = parent->
Size + parent->
Offset - position;
1855 bool status =
false;
1859 if(atom.Type == info.
Type){
1860 info.
Size = atom.Size;
1871 position += atom.Size;
1879 while(!done && position < max_size);
1889 long offset = info.
Offset -
sizeof(__MacAtom);
1891 WARNX(OwlFileSystem,1, 0,
"TQtFile::Ascent() error seek, line: " << __LINE__);
1896 atom.Type = info.
Type;
1897 atom.Size = info.
Size;
1899 WARNX(OwlFileSystem,1, 0,
"TQtFile::Ascent() error write to file, line: " << __LINE__);
1915 atom.Type = info.
Type;
1919 WARNX(OwlFileSystem,1, 0,
"TQtFile::CreateChunk() error write to file, line: " << __LINE__);
1929static void sys2StrmMode(
int& uMode,
uint32 openMode)
1932 uMode |= ios::binary;
1934 uMode |= ios::in|ios::out;
1947 uMode |= ios::trunc;
1962 sys2StrmMode(uMode, mode);
1964 Parent->open(
_W2A(fileName.c_str()),
static_cast<ios::openmode
>(uMode));
1974 return Parent->rdbuf()->is_open();
1986 if(
Parent->rdbuf()->close() ==
nullptr)
1994 streamsize n =
Parent->gcount();
1999 return Parent->fail() == 0 ? numBytes :
static_cast<uint32>(n);
2005 return Parent->fail()==0 ? true :
false;
2038 retval =
Parent->tellp();
2040 retval =
Parent->tellg();
2041 if(retval == streampos(-1))
2043 return static_cast<uint32>(retval);
2049 streampos retval =
Parent->tellp();
2050 if(retval == streampos(-1))
2052 return static_cast<uint32>(retval);
2062 return uint64(
Seek(
static_cast<long>(offset), origin));
2069 Parent->seekp(
static_cast<streamoff
>(offset),
static_cast<ios::seekdir
>(origin));
2071 Parent->seekg(
static_cast<streamoff
>(offset),
static_cast<ios::seekdir
>(origin));
#define WARNX(group, condition, level, message)
#define PRECONDITION(condition)
virtual uint32 Read(void *buffer, uint32 numBytes)
Reads numBytes from the file into buffer. The number of bytes read is returned.
virtual ~TBufferedFile()
The buffer is flushed. If ShouldDelete is true the buffer is deleted.
virtual bool Write(const void *buffer, uint32 numBytes)
Writes numBytes of buffer to the file.
uint32 EndPos
Offset in file to the last data byte in the buffer.
virtual bool FlushBuffer()
Flushes the buffer by writing any unwritten data to the file.
uint8 * CurByte
Pointer to current position in the buffer.
virtual uint64 Length64() const
Returns the file length plus the length of unwritten data in the buffer.
virtual void InitBuffer(uint size=DefaultBufferSize)
Allocates a buffer of size bytes.
uint FileBufSize
Size of FileBuffer in bytes.
uint8 * FileBuffer
Buffer used to store data in.
bool BufferEmpty
True if the buffer is empty; false otherwise.
uint32 StartPos
Offset in file to byte 0 of the buffer.
virtual bool Length(uint64 newLen)
Flushes the buffer and then resizes file to newLen.
virtual uint64 Seek(int64 offset, TSeekDir origin=beg)
Repositions the file pointer to offset bytes from the specified origin.
virtual uint32 Position() const
Returns the current position of the file pointer.
uint32 CurPos
Offset in file to current position.
bool ShouldDelete
True if the buffer should be deleted.
virtual void SetBuffer(uint8 *buffer, uint size, bool shouldDelete=true)
Flushes the current buffer and then deletes it if ShouldDelete is true.
TDiskFileHandle * Clone() const
virtual bool UnlockRange(uint32 position, uint32 count)
virtual bool Length(uint64 newLen)
virtual uint64 Seek(int64 offset, TFile::TSeekDir origin=TFile::beg)
virtual bool Write(const void *buffer, uint32 numBytes)
virtual uint64 Position64() const
virtual bool LockRange(uint32 position, uint32 count)
virtual bool GetStatus(TFileStatus &status) const
TDiskFileHandle(const tstring &fileName, uint32 mode)
virtual uint32 Read(void *buffer, uint32 numBytes)
virtual uint32 LastError()
virtual uint64 Length64() const
virtual uint32 Length() const
virtual uint32 Position() const
virtual bool LockRange(uint32 position, uint32 count)=0
virtual TFileHandle * Clone() const =0
virtual bool UnlockRange(uint32 position, uint32 count)=0
The TFile class encapsulates standard file characteristics and operations.
virtual bool Open(const tstring &fileName, const uint32 mode=ReadOnly|PermRead|OpenExisting)
Opens file name with the given mode.
bool IsOpen() const
Returns true if the file is open, false otherwise.
virtual uint64 readUint64()
uint BufSize
Size of Buffer used with structure read/write.
virtual uint64 Seek(int64 offset, TSeekDir origin=beg)
Repositions the file pointer to offset bytes from the specified origin.
bool ShouldClose
Should C++ object close file on dtor.
@ Text
type Text are used in derived classes only default type is Binary
@ PermWrite
Subsequent open operations on the object will succeed only if write access is requested.
@ CreateNew
Creates a new file. The function fails if the specified file already exists.
@ TruncateExist
Opens the file.
@ OpenExisting
Opens the file. The function fails if the file does not exist.
@ PermRead
Subsequent open operations on the object will succeed only if read access is requested.
@ CreateAlways
Creates a new file. The function overwrites the file if it exists.
uint8 * Buffer
Buffer used with structure read/write.
virtual bool Flush()
Performs any pending I/O functions. Returns true if successful; false otherwise.
virtual double readDouble()
virtual bool LockRange(uint32 position, uint32 count)
Locks count bytes, beginning at position of the file.
virtual void writeUint8(const uint8)
virtual uint32 Read(void *buffer, uint32 numBytes)
Reads numBytes from the file into buffer. The number of bytes read is returned.
uint WriteStruct(void *buffer, TBinType btype, TByteOrderType type)
Writes predefined structures to binary file.
virtual float readFloat()
virtual void writeFloat(const float)
virtual uint16 readUint16()
virtual uint32 readUint32()
TFileHandle * Handle
Low-level C file handle.
virtual bool Write(const void *buffer, uint32 numBytes)
Writes numbytes of buffer to the file.
virtual bool UnlockRange(uint32 position, uint32 count)
Unlocks the range at the given Position.
virtual void writeDouble(const double)
uint ReadStruct(void *buffer, TBinType btype, TByteOrderType type)
Read binary predefined structure from file.
virtual ~TFile()
If ShouldClose is true the file is closed.
uint32 GetOpenMode() const
Returns OpenMode.
static uint StructSize(TBinField *fields)
Returns the number of bytes in a binary data structure.
uint32 SeekToBegin()
Repositions the file pointer to the beginning of the file.
virtual uint8 readUint8()
TFile()
Creates a TFile object with a file handle of FileNull.
virtual void writeUint16(const uint16)
TBinType
Binary data type enumerations.
virtual void writeUint32(const uint32)
virtual TFileHandle * GetHandle() const
Returns Handle.
@ cur
Seek from the current position in the file.
@ end
Seek from the end of the file.
@ beg
Seek from the beginning of the file.
virtual bool Close()
Closes the file. Returns true if successful, false otherwise.
virtual void writeUint64(const uint64)
bool GetStatus(TFileStatus &status) const
Fills status with the current file status.
virtual bool NextLine()
Loads the next line in the file. Returns true if successful; false otherwise.
TFileLineIterator()
Protected default constructor. Intializes everything to 0.
virtual ~TFileLineIterator()
Deletes the buffer.
TCHAR * LineBuffer
Buffer lines of text are loaded into.
uint BuffSize
Size of the buffer allocated for loading a line of text.
uint LineNumber
Current line number in buffer. Line numbering starts at 1.
TTextFile * File
Pointer to the file being iterated through.
TFileName()
Constructs an empty filename.
TFileTime is a class derived from the structure FILETIME.
bool Descent(TQtInfo &info, TQtInfo *parent=0, const TFindFlags=TFindFlags(ffFindChunk|ffReset))
bool Ascent(TQtInfo &info)
bool CreateChunk(TQtInfo &info)
Writes a data structure of the specified type to the associated file.
bool Ascent(TCkInfo &info)
bool CreateChunk(TCkInfo &info, const TCreateFlags=cfCreateChunk)
Writes a data structure of the specified type to the associated file.
bool Descent(TCkInfo &info, TCkInfo *parent=0, const TFindFlags=ffFindAny)
virtual bool Open(const tstring &fileName, const uint32 mode=ReadOnly|PermRead|OpenExisting)
virtual uint32 LastError()
virtual bool Write(const void *buffer, uint32 numBytes)
virtual uint64 Seek(int64 offset, TFile::TSeekDir origin=TFile::beg)
virtual uint64 Position64() const
TStreamHandle(TStreamFile *parent, const tstring &filename, uint32 mode)
virtual bool LockRange(uint32 position, uint32 count)
virtual bool Length(uint64 newLen)
virtual uint32 Length() const
virtual uint64 Length64() const
TStreamHandle * Clone() const
virtual uint32 Position() const
virtual bool GetStatus(TFileStatus &status) const
virtual bool UnlockRange(uint32 position, uint32 count)
virtual uint32 Read(void *buffer, uint32 numBytes)
The TTextFile class is derived from TBufferedFile and encapsulates standard file characteristics and ...
virtual double readDouble()
virtual uint32 readUint32()
virtual float readFloat()
virtual void writeUint64(const uint64)
virtual uint16 readUint16()
virtual uint64 readUint64()
virtual void writeUint8(const uint8)
virtual void writeUint32(const uint32)
virtual uint8 readUint8()
virtual void writeDouble(const double)
virtual TCHAR * GetString(TCHAR *buffer, uint32 size)
Reads up to size characters and places them in buffer.
virtual void writeFloat(const float)
virtual bool WriteString(LPCTSTR str)
Writes the NULL terminated character string in buffer to the file and adds a terminating \r\n charact...
virtual void writeUint16(const uint16)
The TTime class encapsulates time functions and characteristics.
TTime()
Construct TTime with current time (seconds since Jan 1, 1901).
#define BINCHECKRTYPE(type)
#define BINCHECKNBYTES(nBytes)
TXOwl(const tstring &msg, uint resId=0)
An OWL exception with a given message for displaying and an unsigned Id that can be used for identifi...
TByteOrderType
The byte order type.
#define FileNull
Represents a NULL file handle.
TByteOrderType EndianType()
@ boLittle_Endian
LSB at lowest address: Intel //.
@ boBig_Endian
MSB at lowest address: Motorola //.
Object Windows Library (OWLNext Core).
uint16 SwapUint16(uint16 u16)
void __MakeDosTime(const TTime &time, uint16 &fdate, uint16 &ftime)
uint __sys2Atr(uint32 attrib)
int binCVTCharLBF(uint8 *src, uint8 *dst, int, int size, int count)
tstring CopyText(int size, TGetText get_text)
Copies text from a C-string (null-terminated character array) into a string object,...
int(*) cvtDispatchFunc(uint8 *, uint8 *, int, int, int)
uint32 SwapUint32(uint32 u32)
bool IsRepresentable(U v)
Helper function for testing for integer truncations.
TTime __MakeTTime(uint16 fdate, uint16 ftime)
DIAG_DEFINE_GROUP_INIT(OWL_INI, OwlApp, 1, 0)
owl::ipstream & operator>>(owl::ipstream &is, TColor &c)
Extract the color value from a persistent input stream.
int binCVTCharMBF(uint8 *src, uint8 *dst, int, int size, int count)
uint __attr2Sys(uint attrib)
#define COUNTOF(s)
Array element count Important: Only use this with an argument of array type.
The TBinField struct describes a group of like-typed fields in a structure to be read or written usin...
TVarType Type
Declared type of struct field.
RIFF chunk information data structure.
uint32 Flags
flags used by MMIO functions
uint32 Offset
offset of data portion of chunk
uint32 Type
form type or list type
tchar fullName[_MAX_PATH]
QuickTime atom information data structure.
uint32 Type
chunk identifier
Classes for window system structure and type encapsulation.