delphi – Runtime error 217 – como descobrir uma dll com incompatibilidade

Tenho uma aplicação Delphi que roda normalmente na minha máquina com Windows 10.
Copiando esse programa com todos arquivos e dll específicas para outros computadores, de cara já dá “Runtime error 217”.
Em uma das máquinas com Windows 7, mandei o Windows procurar solução de compatibilidade, e isso funcionou.
Mas em outros, mesmo com Windows 10, o problema permanece.

Tudo indica que é carregada alguma dll nos arquivos do Windows com versão diferente e incompatível. Mas são em torno de 120 dll que são carregadas, apenas 10 são as da pasta da minha aplicação.

Existe alguma técnica para identificar qual seria essa dll?

Como na minha máquina isso não ocorre, não adianta fazer debug nela.

How to call a VBscript function from a pointer obtained by Getref in a Delphi COM server application

I have a COM server application and I need to link reminders to specific events that are linked late.

My VB test script is as follows

Sub Main
  dim Frm
  Set Frm=NewForm("Form1")
  Frm.OnActivate = getRef("Frm_OnActivate")
  a= Frm.Showmodal
end Sub

sub Frm_OnActivate
  MsgBox("Activate")
end Sub

My com server has the onActivate property which is of type OleVariant.

function TALform.Get_OnActivate: OleVariant;
begin
  result:=FonActivate;
end;

procedure TALform.Set_OnActivate(Value: OleVariant);
begin
  FonActivate:=Value;
  Fform.OnActivate:=OnactivateEx
end;

My question is, after getting this value, how do I call the VBscript function from the value stored in the Olevariant (which the debugger says is of type VarDispatch)?

delphi – How to know if the form which is a child of a TPanel is open

Oops!
I have a doubt. How to know if a form assigned as a child of a TPanel is it fir?
My form is created like this:

if not(Assigned(Form2)) then
begin
  Form2 := TForm2.Create(self);
  Form2.Parent := Panel1;
  Form2.Show;
end;

The goal is to avoid creating another instance of the same form. I tried like this, if not(Assigned(Form2)) then and always says that she is not Assigned and create another form.

delphi 7 – Delay in closing the SqlConnection connection

My Delphi 7 application connects to a remote Firebird database. Before, the connections were always open and certain problems arose. I therefore decided to adapt the application to close the connection after each request, despite the increase in time to establish the connection, avoided the problems of the past. It turns out that when calling the method to close the connection TSqlConnection.Close or TSqlConnection.Active: = False, there is a delay of a few seconds, which corresponds to the time that it takes to establish the connection. Is there any other way to close the connection immediately without this blessed delay?

The application procedure looks like this:

procedure Banco_ExecSQL(pSql: string);
begin
  with DM.Qry do
  begin
    Close;
    SQL.Clear;
    SQL.Add(pSql);
    try
      ExecSQL;
      Mensagem('Operação realizada com sucesso.', 1);
    finally
      DM.CNX.Close; //Aqui está havendo o delay
    end;
  end;
end;

How to clear the cache in Tfrm_OAuthWebForm delphi?

I've built the rest client using the Facebook API using Delphi, I'm trying to follow this tutorial "Tutorial: _Using_the_REST_Client_Library_to_Access_REST-based_Web_Services", but the session is still open.

What I mean is that at first try I get access_token and get access_token, but on the second try, the application is not direct when connecting. I want each application to be close to the user to which it will first connect, that is to manage multiple users when they use the same application.

Then my question is: is there a way to clear the cache in Tfrm_OAuthWebForm?
In the last code, I published the component but I still do not work.

64-bit – How to use libjepeg-turbo with 64-bit Delphi

I would like to use libjpeg-turbo in my project Delphi (Rio 10.3). The sources are here. There is a Delphi port named DelJpegEx Gabriel Corneanu, but this port has been more or less abandoned since version 1.5.1 and for another, it is 32 bits, while I need 64 bits.
From what I've been able to discover until now, I need to 64 bits .Obj files that the Delphi compiler can use to produce a .dcu file. Apparently you need to use a makefile to produce these 64-bit .obj files, but I do not know how to do it. Can any one provide a recipe how to do it?

Quick Reports – Bring Delphi RichEdit formatting into FastReport Rich Text

I need to take the font size, color and style of formatting from TRichEdit to Rich Text for the Fast Report. I've put some of my text in bold and red, but in the report preview, everything displays without the formatting that I put. . Can someone help me?

Delphi if structure

Salutations to all

This code snippet is part of another element that I use to extract concatenated external texts, it works a lot, but in the project here, loading takes 11 minutes to complete the run. I'm trying to extract the code. see if this resolves and diminishes this time.

Could you erase this code here?

begin 
if StringGrid1.Cells(1,3)  ('')  then 
for i:=1 to 100 do memo40.Lines.add(StringGrid1.Cells(i,3)) 
end ;
begin 
if StringGrid1.Cells(1,4)  ('')  then 
for i:=1 to 100 do memo41.Lines.add(StringGrid1.Cells(i,4)) 
end ;
begin 
if StringGrid1.Cells(1,5)  ('')  then 
for i:=1 to 100 do memo42.Lines.add(StringGrid1.Cells(i,5)) 
end ;
begin if StringGrid1.Cells(1,6)  ('')  then 
for i:=1 to 100 do memo43.Lines.add(StringGrid1.Cells(i,6)) 
end ;
begin 
if StringGrid1.Cells(1,7)  ('')  then 
for i:=1 to 100 do memo44.Lines.add(StringGrid1.Cells(i,7))
end ;
begin 
if StringGrid1.Cells(1,8)  ('')  
then for i:=1 to 100 do memo45.Lines.add(StringGrid1.Cells(i,8)) 
end ;
begin 
if StringGrid1.Cells(1,9)  ('')  then 
for i:=1 to 100 do memo46.Lines.add(StringGrid1.Cells(i,9)) 
end ;
begin 
if StringGrid1.Cells(1,10) ('')  then 
for i:=1 to 100 do memo47.Lines.add(StringGrid1.Cells(i,10))
end ;
begin if StringGrid1.Cells(1,11) ('')  then 
for i:=1 to 100 do memo48.Lines.add(StringGrid1.Cells(i,11))
end ;

to start
if StringGrid1.Cells (1,12) (& # 39;) then
for i: = 1 to 100 of memo49.Lines.add (StringGrid1.Cells (i, 12))
end

drm – Securing Delphi applications SSL traffic against decryption

I've written a VCL application using Delphi10.2, it has a simple activation configuration, the encrypted key is stored in the Kinvey backend. the key to decrypt the encrypted key is hidden in the source code. Now, to establish an HTTPS connection, the application needs the ssl files of Indy, libeay32.dll and ssleay32.dll. They are tied in the same folder with the exe. My concern is: is it possible to use DLL files to extract the private key in order to decrypt HTTPS traffic? and if they succeed, will the attacker be able to detect the encrypted key?
note: I am talking about armature crackers, my app is not published worldwide.

ftp – Using SFTP Delphi

Hello

first time, I have to use SFTP for file downloads. I ended up reading some information about IdFTP that I had already used for FTP, but it seems to me that I should also use IdSSLIOHandlerSocketOpenSSL and let the libeay32.dll and ssleay32.dll dll with .exe to create SFTP . I did all the examples I found but none worked. I have the same OOPS error: I can not read the user list file: /etc/vsftpd.userlist

Does any one have an example of the correct configuration of the components IdFTP and IdSSLIOHandlerSocketOpenSSL just like downloading files ???

Thank you so much …