Subversion Repositories currency_converter

Rev

Rev 2 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 13
Line 210... Line 210...
210
      x.InteractiveAPIKeyInput := Flags and CONVERT_NO_INTERACTIVE_API_KEY_INPUT = 0;
210
      x.InteractiveAPIKeyInput := Flags and CONVERT_NO_INTERACTIVE_API_KEY_INPUT = 0;
211
      result := x.GetAcceptedCurrencies(sl, HistoricDate);
211
      result := x.GetAcceptedCurrencies(sl, HistoricDate);
212
      if Assigned(WriteTo) then
212
      if Assigned(WriteTo) then
213
      begin
213
      begin
214
        s := '';
214
        s := '';
215
        for i := 0 to sl.Count - 1 do s := s + Trim(sl.Strings[i]);
215
        for i := 0 to sl.Count - 1 do s := s + WideString(Trim(sl.Strings[i]));
216
        ZeroMemory(WriteTo, (3*result+1)*SizeOf(WideChar));
216
        ZeroMemory(WriteTo, (3*result+1)*SizeOf(WideChar));
217
        CopyMemory(WriteTo, @s[1], 3*result*SizeOf(WideChar));
217
        CopyMemory(WriteTo, @s[1], 3*result*SizeOf(WideChar));
218
      end;
218
      end;
219
    finally
219
    finally
220
      x.Free;
220
      x.Free;
Line 248... Line 248...
248
      x.InteractiveAPIKeyInput := Flags and CONVERT_NO_INTERACTIVE_API_KEY_INPUT = 0;
248
      x.InteractiveAPIKeyInput := Flags and CONVERT_NO_INTERACTIVE_API_KEY_INPUT = 0;
249
      result := x.GetAcceptedCurrencies(sl, HistoricDate);
249
      result := x.GetAcceptedCurrencies(sl, HistoricDate);
250
      if Assigned(WriteTo) then
250
      if Assigned(WriteTo) then
251
      begin
251
      begin
252
        s := '';
252
        s := '';
253
        for i := 0 to sl.Count - 1 do s := s + Trim(sl.Strings[i]);
253
        for i := 0 to sl.Count - 1 do s := s + AnsiString(Trim(sl.Strings[i]));
254
        ZeroMemory(WriteTo, (3*result+1)*SizeOf(AnsiChar));
254
        ZeroMemory(WriteTo, (3*result+1)*SizeOf(AnsiChar));
255
        CopyMemory(WriteTo, @s[1], 3*result*SizeOf(AnsiChar));
255
        CopyMemory(WriteTo, @s[1], 3*result*SizeOf(AnsiChar));
256
      end;
256
      end;
257
    finally
257
    finally
258
      x.Free;
258
      x.Free;