Delphi DLL
Delphi DLL
Replace Deprecated GetExpirationDt
Shows how to replace the deprecated GetExpirationDt method.Chilkat Delphi DLL Downloads
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, CkDateTime, Cache;
...
procedure TForm1.Button1Click(Sender: TObject);
var
cache: HCkCache;
cache_item_key: PWideChar;
dt1: HCkDateTime;
dt2: HCkDateTime;
begin
cache := CkCache_Create();
// ....
// ....
cache_item_key := 'xyz';
// Instead of this:
dt1 := CkCache_GetExpirationDt(cache,cache_item_key);
CkDateTime_Dispose(dt1);
// Do this:
dt2 := CkDateTime_Create();
CkDateTime_SetFromRfc822(dt2,CkCache__getExpirationStr(cache,cache_item_key));
CkCache_Dispose(cache);
CkDateTime_Dispose(dt2);
end;