问题
I'm using Delphi Chromium Embedded in my application. I should need to save user's account info in a cookie. I know there's CefCookieManager to do it, but i'm not able to find the right procedure to store and to get cookie's value.
回答1:
Uses
ceflib;
const
DefaultCookiesDir = 'Cookies/';
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
var
CookieManager: ICefCookieManager;
CookiesPath : String;
begin
CookiesPath := ExtractFilePath(Application.ExeName) + DefaultCookiesDir + 'User1';
CookieManager := TCefCookieManagerRef.GetGlobalManager;
CookieManager.SetStoragePath(CookiesPath);
Chromium1.Load('www.vk.com');
end;
来源:https://stackoverflow.com/questions/16086160/delphi-chromium-embedded-create-and-get-a-cookie