From: <ah...@us...> - 2008-03-10 17:03:33
|
Revision: 11755 http://jvcl.svn.sourceforge.net/jvcl/?rev=11755&view=rev Author: ahuser Date: 2008-03-10 10:03:24 -0700 (Mon, 10 Mar 2008) Log Message: ----------- Further Unicode preparations Modified Paths: -------------- trunk/jvcl/run/JvDesignClip.pas trunk/jvcl/run/JvDockTree.pas trunk/jvcl/run/JvID3v2Base.pas trunk/jvcl/run/JvInterpreter.pas trunk/jvcl/run/JvJCLUtils.pas trunk/jvcl/run/JvTimeLine.pas trunk/jvcl/run/JvToolEdit.pas Modified: trunk/jvcl/run/JvDesignClip.pas =================================================================== --- trunk/jvcl/run/JvDesignClip.pas 2008-03-09 23:02:21 UTC (rev 11754) +++ trunk/jvcl/run/JvDesignClip.pas 2008-03-10 17:03:24 UTC (rev 11755) @@ -85,7 +85,7 @@ MS.WriteComponent(InComponent); MS.Position := 0; SZ := MS.Size; - InStream.Write(SZ, 8); + InStream.Write(SZ, SizeOf(SZ)); InStream.CopyFrom(MS, SZ); finally MS.Free; @@ -98,7 +98,7 @@ MS: TMemoryStream; SZ: Int64; begin - InStream.Read(SZ, 8); + InStream.Read(SZ, SizeOf(SZ)); MS := TMemoryStream.Create; try MS.CopyFrom(InStream, SZ); Modified: trunk/jvcl/run/JvDockTree.pas =================================================================== --- trunk/jvcl/run/JvDockTree.pas 2008-03-09 23:02:21 UTC (rev 11754) +++ trunk/jvcl/run/JvDockTree.pas 2008-03-10 17:03:24 UTC (rev 11755) @@ -425,8 +425,8 @@ procedure SplitterMouseDown(OnZone: TJvDockZone; MousePos: TPoint); virtual; procedure SplitterMouseUp; virtual; procedure ResetBounds(Force: Boolean); virtual; - procedure WriteControlName(Stream: TStream; const ControlName: string); - procedure ReadControlName(Stream: TStream; var ControlName: string); + procedure WriteControlName(Stream: TStream; const ControlName: AnsiString); + procedure ReadControlName(Stream: TStream; var ControlName: AnsiString); procedure ShowControl(Control: TControl); procedure HideControl(Control: TControl); procedure ShowAllControl; @@ -3513,14 +3513,14 @@ DoSaveZone(Stream, Zone.NextSibling, Level); end; -procedure TJvDockTree.WriteControlName(Stream: TStream; const ControlName: string); +procedure TJvDockTree.WriteControlName(Stream: TStream; const ControlName: AnsiString); var - NameLen: Integer; + NameLen: Longint; begin NameLen := Length(ControlName); Stream.Write(NameLen, SizeOf(NameLen)); if NameLen > 0 then - Stream.Write(Pointer(ControlName)^, NameLen); + Stream.Write(PAnsiChar(ControlName)^, NameLen); end; procedure TJvDockTree.DoLoadZone(Stream: TStream); @@ -3578,10 +3578,9 @@ end; end; -procedure TJvDockTree.ReadControlName(Stream: TStream; - var ControlName: string); +procedure TJvDockTree.ReadControlName(Stream: TStream; var ControlName: AnsiString); var - Size: Integer; + Size: Longint; begin ControlName := ''; Size := 0; @@ -3589,7 +3588,7 @@ if Size > 0 then begin SetLength(ControlName, Size); - Stream.Read(Pointer(ControlName)^, Size); + Stream.Read(PAnsiChar(ControlName)^, Size); end; end; Modified: trunk/jvcl/run/JvID3v2Base.pas =================================================================== --- trunk/jvcl/run/JvID3v2Base.pas 2008-03-09 23:02:21 UTC (rev 11754) +++ trunk/jvcl/run/JvID3v2Base.pas 2008-03-10 17:03:24 UTC (rev 11755) @@ -5445,8 +5445,8 @@ CTagIDSize = 3; CMPEGTagSize = 52; var - TagID: array [0..CTagIDSize - 1] of Char; - MPEGTag: array [0..CMPEGTagSize - 1] of Char; + TagID: array [0..CTagIDSize - 1] of AnsiChar; + MPEGTag: array [0..CMPEGTagSize - 1] of AnsiChar; begin Reset; @@ -8694,7 +8694,7 @@ function TJvID3Stream.WriteTerminatorA: Longint; var - Ch: Char; + Ch: AnsiChar; begin Ch := #0; Result := Write(Ch, 1); Modified: trunk/jvcl/run/JvInterpreter.pas =================================================================== --- trunk/jvcl/run/JvInterpreter.pas 2008-03-09 23:02:21 UTC (rev 11754) +++ trunk/jvcl/run/JvInterpreter.pas 2008-03-10 17:03:24 UTC (rev 11755) @@ -2111,7 +2111,7 @@ FillChar(PP^.Memory^, ArraySize * PP^.ElementSize, 0); if ItemType = varEmpty then for I := 0 to ArraySize - 1 do - PP^.DT.Init(Variant(PVarData(PChar(PP^.Memory) + I * PP^.ElementSize)^)); + PP^.DT.Init(Variant(PVarData(PAnsiChar(PP^.Memory) + I * PP^.ElementSize)^)); end; Result := PP; end; @@ -2131,7 +2131,7 @@ begin if JvInterpreterArrayRec^.ItemType = varEmpty then for I := 0 to ArraySize - 1 do - JvInterpreterVarFree(Variant(PVarData(PChar(JvInterpreterArrayRec^.Memory) + I * + JvInterpreterVarFree(Variant(PVarData(PAnsiChar(JvInterpreterArrayRec^.Memory) + I * JvInterpreterArrayRec^.ElementSize)^)); FreeMem(JvInterpreterArrayRec^.Memory, (JvInterpreterArrayRec^.Size) * JvInterpreterArrayRec^.ElementSize); @@ -2179,7 +2179,7 @@ TStringList(JvInterpreterArrayRec^.Memory).Strings[Offset] := Value; end; varEmpty: - JvInterpreterVarAssignment(Variant(PVarData(PChar(JvInterpreterArrayRec^.Memory) + + JvInterpreterVarAssignment(Variant(PVarData(PAnsiChar(JvInterpreterArrayRec^.Memory) + Offset * JvInterpreterArrayRec^.ElementSize)^), Value) else if JvInterpreterArrayRec^.ItemType = varObject then @@ -2219,7 +2219,7 @@ varString: Result := TStringList(JvInterpreterArrayRec^.Memory).Strings[Offset]; varEmpty: - JvInterpreterVarCopy(Result, Variant(PVarData(PChar(JvInterpreterArrayRec^.Memory) + Offset * + JvInterpreterVarCopy(Result, Variant(PVarData(PAnsiChar(JvInterpreterArrayRec^.Memory) + Offset * JvInterpreterArrayRec^.ElementSize)^)) else if JvInterpreterArrayRec^.ItemType = varObject then @@ -2247,7 +2247,7 @@ begin for I := ASize to OldSize - 1 do if ArrayRec^.ItemType = varEmpty then - JvInterpreterVarFree(Variant((PVarData(PChar(ArrayRec^.Memory) + I * ArrayRec^.ElementSize))^)); + JvInterpreterVarFree(Variant((PVarData(PAnsiChar(ArrayRec^.Memory) + I * ArrayRec^.ElementSize))^)); ArrayRec^.EndPos[0] := ArrayRec^.EndPos[0] - (OldSize - ASize); ArrayRec^.Size := GetArraySize(1, ArrayRec^.BeginPos, ArrayRec^.EndPos); ReallocMem(ArrayRec^.Memory, ASize * ArrayRec^.ElementSize); @@ -2256,11 +2256,11 @@ if OldSize < ASize then begin ReallocMem(ArrayRec^.Memory, ASize * ArrayRec^.ElementSize); - FillChar((PChar(ArrayRec^.Memory) + OldSize * ArrayRec^.ElementSize)^, + FillChar((PAnsiChar(ArrayRec^.Memory) + OldSize * ArrayRec^.ElementSize)^, (ASize - OldSize) * ArrayRec^.ElementSize, 0); for I := OldSize to ASize - 1 do if ArrayRec^.ItemType = varEmpty then - ArrayRec^.DT.Init(Variant(Pointer(PChar(ArrayRec^.Memory) + I * ArrayRec^.ElementSize)^)); + ArrayRec^.DT.Init(Variant(Pointer(PAnsiChar(ArrayRec^.Memory) + I * ArrayRec^.ElementSize)^)); ArrayRec^.EndPos[0] := ArrayRec^.EndPos[0] + (ASize - OldSize); ArrayRec^.Size := GetArraySize(ArrayRec^.Dimension, ArrayRec^.BeginPos, ArrayRec^.EndPos); end; @@ -2308,10 +2308,10 @@ ArrayRec^.EndPos[0] := ArrayRec^.EndPos[0] - 1; ArrayRec^.Size := GetArraySize(ArrayRec^.Dimension, ArrayRec^.BeginPos, ArrayRec^.EndPos); if ArrayRec^.ItemType = varEmpty then - JvInterpreterVarFree(Variant(PVarData(PChar(ArrayRec^.Memory) + + JvInterpreterVarFree(Variant(PVarData(PAnsiChar(ArrayRec^.Memory) + (AElement - ArrayRec^.BeginPos[0]) * ArrayRec^.ElementSize)^)); - Move((PChar(ArrayRec^.Memory) + (AElement - ArrayRec^.BeginPos[0] + 1) * ArrayRec^.ElementSize)^, - (PChar(ArrayRec^.Memory) + (AElement - ArrayRec^.BeginPos[0]) * ArrayRec^.ElementSize)^, + Move((PAnsiChar(ArrayRec^.Memory) + (AElement - ArrayRec^.BeginPos[0] + 1) * ArrayRec^.ElementSize)^, + (PAnsiChar(ArrayRec^.Memory) + (AElement - ArrayRec^.BeginPos[0]) * ArrayRec^.ElementSize)^, (ArrayRec^.EndPos[0] - AElement + 1) * ArrayRec^.ElementSize); ReallocMem(ArrayRec^.Memory, ArrayRec^.Size * ArrayRec^.ElementSize); @@ -2329,13 +2329,13 @@ ArrayRec^.EndPos[0] := ArrayRec^.EndPos[0] + 1; ArrayRec^.Size := GetArraySize(ArrayRec^.Dimension, ArrayRec^.BeginPos, ArrayRec^.EndPos); ReallocMem(ArrayRec^.Memory, ArrayRec^.Size * ArrayRec^.ElementSize); - Move((PChar(ArrayRec^.Memory) + (AElement - ArrayRec^.BeginPos[0]) * ArrayRec^.ElementSize)^, - (PChar(ArrayRec^.Memory) + (AElement - ArrayRec^.BeginPos[0] + 1) * ArrayRec^.ElementSize)^, + Move((PAnsiChar(ArrayRec^.Memory) + (AElement - ArrayRec^.BeginPos[0]) * ArrayRec^.ElementSize)^, + (PAnsiChar(ArrayRec^.Memory) + (AElement - ArrayRec^.BeginPos[0] + 1) * ArrayRec^.ElementSize)^, (ArrayRec^.EndPos[0] - AElement) * ArrayRec^.ElementSize); if ArrayRec^.ItemType = varEmpty then - ArrayRec^.DT.Init(Variant(PVarData(PChar(ArrayRec^.Memory) + + ArrayRec^.DT.Init(Variant(PVarData(PAnsiChar(ArrayRec^.Memory) + (AElement - ArrayRec^.BeginPos[0]) * ArrayRec^.ElementSize)^)); - JvInterpreterVarAssignment(Variant(PVarData(PChar(ArrayRec^.Memory) + + JvInterpreterVarAssignment(Variant(PVarData(PAnsiChar(ArrayRec^.Memory) + (AElement - ArrayRec^.BeginPos[0]) * ArrayRec^.ElementSize)^), Value); end; @@ -2490,14 +2490,14 @@ SourceRecHolder := TJvInterpreterRecHolder(TVarData(Source).VPointer); for I := 0 to SourceRecHolder.JvInterpreterRecord.FieldCount - 1 do if SourceRecHolder.JvInterpreterRecord.Fields[I].Typ = varEmpty then - JvInterpreterVarAssignment(Variant(PVarData(PChar(DestRecHolder.Rec) + + JvInterpreterVarAssignment(Variant(PVarData(PAnsiChar(DestRecHolder.Rec) + DestRecHolder.JvInterpreterRecord.Fields[I].Offset)^), - Variant(PVarData(PChar(SourceRecHolder.Rec) + + Variant(PVarData(PAnsiChar(SourceRecHolder.Rec) + SourceRecHolder.JvInterpreterRecord.Fields[I].Offset)^)) else - Move((PChar(SourceRecHolder.Rec) + + Move((PAnsiChar(SourceRecHolder.Rec) + SourceRecHolder.JvInterpreterRecord.Fields[I].Offset)^, - (PChar(DestRecHolder.Rec) + + (PAnsiChar(DestRecHolder.Rec) + DestRecHolder.JvInterpreterRecord.Fields[I].Offset)^, Typ2Size(SourceRecHolder.JvInterpreterRecord.Fields[I].Typ)); end @@ -2793,7 +2793,7 @@ for I := 0 to JvInterpreterRecord.FieldCount - 1 do begin if JvInterpreterRecord.Fields[I].Typ = varEmpty then - JvInterpreterVarFree(Variant(PVarData(PChar(Rec) + JvInterpreterRecord.Fields[I].Offset)^)); + JvInterpreterVarFree(Variant(PVarData(PAnsiChar(Rec) + JvInterpreterRecord.Fields[I].Offset)^)); end; FreeMem(Rec, JvInterpreterRecord.RecordSize); end; @@ -3992,7 +3992,7 @@ var I: Integer; JvInterpreterRecord: TJvInterpreterRecord; - Rec: PChar; + Rec: PAnsiChar; JvInterpreterRecMethod: TJvInterpreterRecMethod; begin Result := False; @@ -4397,7 +4397,7 @@ I: Integer; JvInterpreterRecord: TJvInterpreterRecord; JvInterpreterRecMethod: TJvInterpreterRecMethod; - Rec: PChar; + Rec: PAnsiChar; begin Result := False; JvInterpreterRecord := (Args.Obj as TJvInterpreterRecHolder).JvInterpreterRecord; @@ -8223,7 +8223,7 @@ EmptyStr: string = ''; var I: Integer; - Rec: PChar; + Rec: PAnsiChar; // Res: Boolean; RecHolder: TJvInterpreterRecHolder; begin Modified: trunk/jvcl/run/JvJCLUtils.pas =================================================================== --- trunk/jvcl/run/JvJCLUtils.pas 2008-03-09 23:02:21 UTC (rev 11754) +++ trunk/jvcl/run/JvJCLUtils.pas 2008-03-10 17:03:24 UTC (rev 11755) @@ -78,7 +78,6 @@ TFileTime = Integer; {$ENDIF UNIX} - function SendRectMessage(Handle: THandle; Msg: Integer; wParam: WPARAM; var R: TRect): Integer; function SendStructMessage(Handle: THandle; Msg: Integer; wParam: WPARAM; var Data): Integer; {$IFDEF CLR} @@ -126,8 +125,8 @@ function AnsiLastChar(const S: AnsiString): AnsiChar; {$ENDIF CLR} -function ReadCharsFromStream(Stream: TStream; var Buf: array of Char; BufSize: Integer): Integer; // ANSI-Stream -function WriteStringToStream(Stream: TStream; const Buf: string; BufSize: Integer): Integer; // ANSI-Stream +function ReadCharsFromStream(Stream: TStream; var Buf: array of AnsiChar; BufSize: Integer): Integer; // ANSI-Stream +function WriteStringToStream(Stream: TStream; const Buf: AnsiString; BufSize: Integer): Integer; // ANSI-Stream const DefaultDateOrder = doDMY; @@ -208,11 +207,11 @@ { Next 4 function for russian chars transliterating. This functions are needed because Oem2Ansi and Ansi2Oem functions sometimes suck } -procedure Dos2Win(var S: string); -procedure Win2Dos(var S: string); -function Dos2WinRes(const S: string): string; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} -function Win2DosRes(const S: string): string; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} -function Win2Koi(const S: string): string; +procedure Dos2Win(var S: AnsiString); +procedure Win2Dos(var S: AnsiString); +function Dos2WinRes(const S: AnsiString): AnsiString; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} +function Win2DosRes(const S: AnsiString): AnsiString; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} +function Win2Koi(const S: AnsiString): AnsiString; { FillString fills the string Buffer with Count Chars } procedure FillString(var Buffer: string; Count: Integer; const Value: Char); overload; @@ -247,7 +246,7 @@ function HasChar(const Ch: Char; const S: string): Boolean; function HasCharW(const Ch: WideChar; const S: WideString): Boolean; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} function HasAnyChar(const Chars: string; const S: string): Boolean; -function CharInSet(const Ch: Char; const SetOfChar: TSysCharSet): Boolean; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} +function CharInSet(const Ch: AnsiChar; const SetOfChar: TSysCharSet): Boolean; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} function CharInSetW(const Ch: WideChar; const SetOfChar: TSysCharSet): Boolean; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} function CountOfChar(const Ch: Char; const S: string): Integer; function DefStr(const S: string; Default: string): string; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE} @@ -686,7 +685,7 @@ if corresponds. } function XorString(const Key, Src: ShortString): ShortString; function XorEncode(const Key, Source: string): string; -function XorDecode(const Key, Source: string): string; +function XorDecode(const Key, Source: AnsiString): AnsiString; { ** Command line routines ** } @@ -1452,22 +1451,24 @@ end; {$ENDIF CLR} -function ReadCharsFromStream(Stream: TStream; var Buf: array of Char; BufSize: Integer): Integer; +function ReadCharsFromStream(Stream: TStream; var Buf: array of AnsiChar; BufSize: Integer): Integer; {$IFDEF CLR} +type + TDynAnsiCharArray = array of AnsiChar; var Bytes: TBytes; + I: Integer; {$ENDIF CLR} begin {$IFDEF CLR} - SetLength(Bytes, BufSize); Result := Stream.Read(Bytes, 0, BufSize); - System.Array.Copy(AnsiEncoding.GetChars(Bytes), 0, Buf, 0, BufSize); + Buf := TDynAnsiCharArray(Bytes); {$ELSE} - Result := Stream.Read(Buf, BufSize); + Result := Stream.Read(Buf[0], BufSize); {$ENDIF CLR} end; -function WriteStringToStream(Stream: TStream; const Buf: string; BufSize: Integer): Integer; +function WriteStringToStream(Stream: TStream; const Buf: AnsiString; BufSize: Integer): Integer; begin {$IFDEF CLR} Result := Stream.Write(BytesOf(Buf), BufSize); @@ -2290,45 +2291,45 @@ {$ENDIF MSWINDOWS} {$ENDIF !CLR} -procedure Dos2Win(var S: string); +procedure Dos2Win(var S: AnsiString); var I: Integer; begin for I := 1 to Length(S) do case S[I] of #$80..#$AF: - S[I] := Char(Byte(S[I]) + (192 - $80)); + S[I] := AnsiChar(Byte(S[I]) + (192 - $80)); #$E0..#$EF: - S[I] := Char(Byte(S[I]) + (240 - $E0)); + S[I] := AnsiChar(Byte(S[I]) + (240 - $E0)); end; end; -procedure Win2Dos(var S: string); +procedure Win2Dos(var S: AnsiString); var I: Integer; begin for I := 1 to Length(S) do case S[I] of #$C0..#$EF: - S[I] := Char(Byte(S[I]) - (192 - $80)); + S[I] := AnsiChar(Byte(S[I]) - (192 - $80)); #$F0..#$FF: - S[I] := Char(Byte(S[I]) - (240 - $E0)); + S[I] := AnsiChar(Byte(S[I]) - (240 - $E0)); end; end; -function Dos2WinRes(const S: string): string; +function Dos2WinRes(const S: AnsiString): AnsiString; begin Result := S; Dos2Win(Result); end; -function Win2DosRes(const S: string): string; +function Win2DosRes(const S: AnsiString): AnsiString; begin Result := S; Win2Dos(Result); end; -function Win2Koi(const S: string): string; +function Win2Koi(const S: AnsiString): AnsiString; const W = '\xE0\xE1\xE2\xE3\xE4\xE5\xB8\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1=\xF3\xF4\xF5\xF7\xF6\xF8\xF9\xFC\xFB\xFA\xFD\xDD\xFF+--+-+\xA8\xC6\xC7++--\xDD-+\xCF\xD0\xD1\xD2\xD3\xD4i\xD7\xD6\xD8+_\xDD+\xDD\xDE\xEE'; K = '--\xD7\xC7-+\xA3\xD6++--\xDD-+\xCF\xD0\xD2\xD3\xD4i\xC6+\xDE+\xDD\xDD\xD8+\xEE_+\xD1\xE1\xE2\xF7\xE7\xE4\xE5\xDD\xF6\xFA\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0=\xF3\xF4\xF5\xE6\xE8\xDD\xE3\xFB\xFD\xF8\xF9\xFF\xFC\xE0\xF1'; @@ -2779,7 +2780,7 @@ Result := Copy(FileName, 1, Length(FileName) - Length(ExtractFileExt(FileName))) + NewExt; end; -function CharInSet(const Ch: Char; const SetOfChar: TSysCharSet): Boolean; +function CharInSet(const Ch: AnsiChar; const SetOfChar: TSysCharSet): Boolean; begin Result := Ch in SetOfChar; end; @@ -2789,7 +2790,7 @@ if Word(Ch) > 255 then Result := False else - Result := Char(Ch) in SetOfChar; + Result := AnsiChar(Ch) in SetOfChar; end; function IntPower(Base, Exponent: Integer): Integer; @@ -6481,17 +6482,17 @@ end; end; -function XorDecode(const Key, Source: string): string; +function XorDecode(const Key, Source: AnsiString): AnsiString; var I: Integer; - C: Char; + C: AnsiChar; begin Result := ''; for I := 0 to Length(Source) div 2 - 1 do begin - C := Chr(StrToIntDef('$' + Copy(Source, (I * 2) + 1, 2), Ord(' '))); + C := AnsiChar(StrToIntDef('$' + Copy(Source, (I * 2) + 1, 2), Ord(' '))); if Length(Key) > 0 then - C := Chr(Byte(Key[1 + (I mod Length(Key))]) xor Byte(C)); + C := AnsiChar(Byte(Key[1 + (I mod Length(Key))]) xor Byte(C)); Result := Result + C; end; end; Modified: trunk/jvcl/run/JvTimeLine.pas =================================================================== --- trunk/jvcl/run/JvTimeLine.pas 2008-03-09 23:02:21 UTC (rev 11754) +++ trunk/jvcl/run/JvTimeLine.pas 2008-03-10 17:03:24 UTC (rev 11755) @@ -2228,11 +2228,10 @@ procedure TJvCustomTimeLine.LoadFromStream(Stream: TStream); var I: Integer; - Ch: Char; - S: string; + Ch: AnsiChar; + S: AnsiString; Item: TJvTimeItem; begin - I := 0; Item := Items.Add; while Stream.Position < Stream.Size do @@ -2277,7 +2276,7 @@ procedure TJvCustomTimeLine.SaveToStream(Stream: TStream); var I: Integer; - S: string; + S: AnsiString; begin for I := 0 to Items.Count - 1 do begin Modified: trunk/jvcl/run/JvToolEdit.pas =================================================================== --- trunk/jvcl/run/JvToolEdit.pas 2008-03-09 23:02:21 UTC (rev 11754) +++ trunk/jvcl/run/JvToolEdit.pas 2008-03-10 17:03:24 UTC (rev 11755) @@ -4635,7 +4635,7 @@ DragQueryFile(Msg.Drop, I, AFileName, 255); ReceptFileDir(AFileName.ToString()); {$ELSE} - DragQueryFile(Msg.Drop, I, PChar(@AFileName), Pred(SizeOf(AFileName))); + DragQueryFile(Msg.Drop, I, PChar(@AFileName[0]), Pred(SizeOf(AFileName))); ReceptFileDir(StrPas(AFileName)); {$ENDIF CLR} if not FMultipleDirs then This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |