wole2stream.hpp

来自「TMSPack基本上涵盖了Delphi所有的基础控件」· HPP 代码 · 共 118 行

HPP
118
字号
// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Wole2stream.pas' rev: 10.00

#ifndef Wole2streamHPP
#define Wole2streamHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Activex.hpp>	// Pascal unit
#include <Comobj.hpp>	// Pascal unit
#include <Xlsmessages.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Wole2stream
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TEnumOle2Open { Ole2_Read, Ole2_Write };
#pragma option pop

struct TMsOleDirInfo
{
	
public:
	WideString Name;
	int OleType;
	__int64 Size;
} ;

typedef DynamicArray<_di_IStorage >  TIStorageArray;

typedef DynamicArray<TMsOleDirInfo >  TMsOleDirInfoArray;

class DELPHICLASS TOle2Storage;
class PASCALIMPLEMENTATION TOle2Storage : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	TEnumOle2Open FMode;
	_di_IStorage FStorage;
	DynamicArray<_di_IStorage >  StorageList;
	__int64 SizeWritten;
	_di_ILockBytes FLockBytes;
	unsigned HLockBytes;
	Classes::TStream* FStream;
	
public:
	__fastcall TOle2Storage(const AnsiString AFileName, const TEnumOle2Open aMode, const bool AllowOverwritingFiles, const Classes::TStream* aStream);
	__fastcall virtual ~TOle2Storage(void);
	void __fastcall GetDirectories(TMsOleDirInfoArray &DirInfo);
	void __fastcall CdUp(void);
	void __fastcall CdDown(const WideString Dir, const bool CreateIfNeeded);
	__property _di_IStorage Storage = {read=FStorage};
	__property TEnumOle2Open Mode = {read=FMode, nodefault};
	void __fastcall Commit(void);
	void __fastcall CheckCommit(const __int64 Count);
};


class DELPHICLASS TOle2Stream;
class PASCALIMPLEMENTATION TOle2Stream : public Classes::TStream 
{
	typedef Classes::TStream inherited;
	
protected:
	TOle2Storage* FStorage;
	_di_IStream FStream;
	
public:
	__fastcall TOle2Stream(const TOle2Storage* AStorage, const WideString StreamName);
	virtual int __fastcall Write(const void *Buffer, int Count);
	virtual int __fastcall Read(void *Buffer, int Count);
	virtual int __fastcall Seek(int Offset, Word Origin)/* overload */;
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TOle2Stream(void) { }
	#pragma option pop
	
	
/* Hoisted overloads: */
	
public:
	inline __int64 __fastcall  Seek(const __int64 Offset, Classes::TSeekOrigin Origin){ return TStream::Seek(Offset, Origin); }
	
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint OptionsReadStorage = 0x10;
static const int OptionsReadRoot = 0x40000;
static const Shortint OptionsWrite = 0x11;
static const Word OptionsStreamWrite = 0x1011;
static const Shortint OptionsStreamRead = 0x10;
static const Shortint MsOleStreamT = 0x2;
static const Shortint MsOleStorageT = 0x1;

}	/* namespace Wole2stream */
using namespace Wole2stream;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Wole2stream

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?