当我想将其保留为控制台应用程序时(最终将保留),我看到的每个示例都使用 Form ,因此在此方面并没有走得太远。
以下代码每次使用EIPAbstractError: IPProcs is not defined. Make sure IPPeerCommon() is in the uses clauses.
将其添加到 Uses 子句中 No peer with the interface guid [xxx-xx...]
program EMV_ConsoleTest;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils, REST.Client;
var
LClient: TRESTClient;
begin
try
LClient := TRESTClient.Create('http://localhost:9000/');
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.
Run Code Online (Sandbox Code Playgroud)