Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Post with CEF4Delphi

Post Reply
User avatar
salvadordf
Posts: 4052
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Post with CEF4Delphi

Post by salvadordf »

Hi,

Did you use the code from this post?
https://groups.google.com/forum/?fromgr ... 1_ytEvBHEs

It's repeated here with more comments :
https://stackoverflow.com/questions/129 ... h-chromium

CreateField is a custom function defined in the first code block in that answer :

Code: Select all

function CreateField(const AValue: AnsiString): ICefPostDataElement;
begin
  Result := TCefPostDataElementRef.New;
  Result.SetToBytes(Length(AValue), PAnsiChar(AValue));
end;
That code is 7 years old and CEF has evolved a lot since then.

At that time, the TCefRequestRef.Flags were named WUR_FLAG_* but those names changed to UR_FLAG_* (without the W).
If you want to use those flags in CEF4Delphi you will have to add uCEFConstants to the uses section.

In order to use TCefRequestRef, TCefStringMultimapOwn, TCefPostDataRef and TCefPostDataElementRef you will have to add uCEFRequest, uCEFStringMultimap, uCEFPostData and uCEFPostDataElement to the uses section.

ceflib is a DCEF3 unit and it doesn't exists in CEF4Delphi. All the DCEF3 units were split into many smaller units when CEF4Delphi was created.
User avatar
salvadordf
Posts: 4052
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Post with CEF4Delphi

Post by salvadordf »

I'm not allowed to visit https://enigma.unam.mx
It only shows a warning "Atención Acceso restringido".

Perhaps you are missing some form data field. I can only suggest that you try to submit a much simpler form in a local Apache server where you have absolute control to the server logs and web pages.
coater
Posts: 135
Joined: Sat Sep 29, 2018 1:51 pm

Re: Post with CEF4Delphi

Post by coater »

In order to use TCefRequestRef, TCefStringMultimapOwn, TCefPostDataRef and TCefPostDataElementRef you will have to add uCEFRequest, uCEFStringMultimap, uCEFPostData and uCEFPostDataElement to the uses section.
-----------------------
How can I know which unit I should use if you don't tell me? Thank you!
User avatar
salvadordf
Posts: 4052
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Post with CEF4Delphi

Post by salvadordf »

Hi,

Most of the time the units have a very similar name than the class you are looking for but you can use the "Find In Files" function in Delphi too.

Press CONTROL + SHIFT + F inside Delphi and type the class name in the "Text to find" box. Select the "Search in directories" and click on the yellow folder button to select the "source" directory inside CEF4Delphi. Then click on the "OK" button and you will see all the matches and the unit names in the "messages" window.

This is an old screenshot of the "Find In Files" window :
Image

https://stackoverflow.com/questions/337 ... -api-calls
coater
Posts: 135
Joined: Sat Sep 29, 2018 1:51 pm

Re: Post with CEF4Delphi

Post by coater »

Thank you very much! Have a nice day!
Post Reply