Google了一下,找了段代码,你看能不能用:procedure FromStream(AStream: TStream;ABook: F1Book);var Handle: DWORD; Size: DWORD; P: Pointer;begin AStream.ReadBuffer(Size, SizeOf(Size)); Handle := GlobalAlloc(GMEM_MOVEABLE, Size + SizeOf(Size)); try P := GlobalLock(Handle); try PDWORD(P)^ := Size; AStream.ReadBuffer(Pointer(DWORD(P) + SizeOf(Size))^, Size); finally GlobalUnlock(Handle); end; ABook.ReadFromBlob(Handle, 0); finally GlobalFree(Handle); end; end; procedure ToStream(ABook: F1Book; AStream: TStream);var Handle: DWORD; Size: DWORD; P: Pointer;begin Handle := ABook.WriteToBlobEx(0); try P := GlobalLock(Handle); try Size := PDWORD(P)^; AStream.WriteBuffer(P^, Size+SizeOf(Size)); finally GlobalUnlock(Handle); end; finally GlobalFree(Handle); end; end;