不同之处
因此:
SourceString := I am doing just fine! ;
MemoryStream.ReadBuffer(Pointer(SourceString)^, xxx);
(此处可查的全源代码:http://edn.embarcadero.com/article/26416)
以及这一法典(地雷):
SetLength(SourceString, xxx);
MemoryStream.ReadBuffer(SourceString[1], xxx);
- Do I really have to use Pointer(SourceString)^ or SourceString[1] is ok also?
- The code (both of them) will work with Delphi 2010 (unicode)?