- common\Stream.h中定义了 struct stream
// read from stream
typedef int (*streamread)(void* This,void* Data,int Size);
// read from stream to block
typedef int (*streamreadblock)(void* This,block* Block,int Ofs,int Size);
// seek
typedef filepos_t (*streamseek)(void* This,filepos_t Pos,int SeekMode);
// write to stream
typedef int (*streamwrite)(void* This,const void* Data,int Size);
// list directory
typedef int (*streamenumdir)(void* This,const tchar_t* URL,const tchar_t* Exts,bool_t ExtFilter,streamdir* Item);
// data available
typedef int (*streamdataavail)(void* This);
typedef struct stream
{
VMT_NODE
streamread Read;
streamreadblock ReadBlock;
streamseek Seek;
streamenumdir EnumDir;
streamwrite Write;
streamdataavail DataAvailable;
} stream;
在common\win32\File_win32.c中又定义了
typedef struct filestream
{
stream Stream;
tchar_t URL[MAXPATH];
HANDLE Handle;
filepos_t Length;
filepos_t Pos;
bool_t Silent;
bool_t Create;
HANDLE Find;
const tchar_t* Exts;
bool_t ExtFilter;
WIN32_FIND_DATA FindData;
} filestream;
有点像继承关系了。stream Stream;之下的东西都是FileStream所特有的。 - 在TCPMP中使用了aygshell.dll
关于此DLL,参考MSDN文章: 使用 AYGShell 实现 Windows CE .NET 和 Pocket PC 2002 外壳兼容性 。
-
TCPMP关于UI的大部分编码都在 interface\win32\win_win32.c中。

