Quantcast
Channel: Recent Topics - Forum - Embarcadero Community - Embarcadero Community
Viewing all 3677 articles
Browse latest View live

Avast detecting threat with RTL - by: Carlos

$
0
0
I am using C ++ Builder RAD10.2 Tokyo. If I compile with dynamic RTL everything is fine. But if I include it inside the Exe, Avast says: Win32: MalOb-CA [Cryp]. I already reported it as a false positive. It is absolutely necessary that my application be standalone. Not only does my application have this. Any Win32 with static RTL is detected as a threat by Avast. What to do ?

Spotify API Client Credentials Flow - by: cobaia

$
0
0
Can anyone help me use http with sporify?
I do not know where I'm going wrong! = \

I'm trying to use this authentication:
developer.spotify.com/web-api/authorization-guide/

I got some examples in C #:

sample 1
gist.github.com/lqdev/5e82a5c856fcf0818e0b5e002deb0c28

sample 2
gist.github.com/aaronhoffman/6383054e14427a22ddc11045f53b0e6e

I'm trying to port to delphi, but I'm not succeeding, could you help me? just put an idhttp and paste the code below

Note: when it is working, I delete the app I created in spotify, because the keys below are real!

my code (not work):

uses: System.NetEncoding

var
URL, valor: string;
SpotifyClientID, SpotifyClientSecret: string;
JsonStreamEnvio: TStringStream;
begin
URL := ' accounts.spotify.com/api/token ';
JsonStreamEnvio := TStringStream.Create('grant_type, client_credentials', TEncoding.UTF8);

idHttp.Request.Clear;
idHttp.Request.CustomHeaders.Clear;
idHttp.Request.ContentType := 'application/json';
IdHttp.Request.CharSet := 'utf-8';

SpotifyClientID := 'babf60d97d954cc089fa26e28ffb1bb7';
SpotifyClientSecret := 'da28e5d2f32945069928f9d6d7e2f258';
valor := SpotifyClientID+':'+SpotifyClientSecret;
valor := TNetEncoding.Base64.Encode(valor);

idHttp.Request.CustomHeaders.AddValue('Authorization', 'Basic '+valor);
idHttp.Response.CharSet := 'UTF-8';

try
idHttp.Post(URL, JsonStreamEnvio);
except
on E:EIdHTTPProtocolException do
ShowMessage(e.ErrorMessage);
end;

STL set_intersection with classes - by: Digby

$
0
0
Hello,

I was wondering if set_intersection can be used with classes or does it only work with C++ types

e.g. I have following code with C++ classes;

struct data {
int field1
int commonfield
};

vector<data> data1(5), data2(5), data3(5)

struct comp { // -Checked 12-2-02

bool operator()(const data& lhs, const data& rhs) const

{

return (lhs.commonfield < rhs.commonfield);

}

};
std::set_intersection(data1.begin(), data1.end(), data2.begin(),
data2.end(), data3.begin(), comp());

Does this code then find the intersection based on commonfield, or can I only use C++ types e.g. vector<int> ?

REST Calls - Abort or Timeout for calls > 30 seconds - by: George

$
0
0
Hello,
I have written a REST service. It takes 2 parameters, one of which is a table/report name. If the volume of data is small, then data is downloaded. If the volume of data is large, a request ID is returned, and the app will then deal with that...

When I use POSTMAN, everything works fine, long running requests return the request ID from the REST Service. When I wrote my own application, I ran into an issue if the request takes > 30 seconds, so I switched to the RESTDebugger that comes with Delphi (Tokyo). The issue is that if the call returns in less than 30 seconds, everything works fine, I get either data (for short reports) or Request IDs for longer reports. If the call takes more than 30 seconds (and 30 seconds may not be the exact cutoff number), the REST Service call fails. The report I am running returns in 32 seconds. It runs fine on POSTMAN. Smaller reports runs fine on RESTDebugger (15 seconds or so). The reports are literally just a 'select * from table' at this point, so there is no possibility of bad SQL, It appears that there is a timeout somewhere, but only the RESTRequest component that has a timeout. This is set to 0, which should be 'no timeout'. RESTDebugger does not give me any error. When I try to trap an exception in my app, I get a status return code of 0. How do I debug this, or is there a known culprit?

TListView Footer Text Live Bindings - by: Milan

$
0
0
I have not been able to use Live Bindings to connect a Data Generator source field to the Text property of a TListView Footer. This is because I can't seem to locate a Live Bindings entry for the TListView item.

Can someone explain to me how this operates?

C++ Builder Modbus CodeExample - by: Marcos

$
0
0
Hi guys,
I need to read Modbus data 0x03.
I need any code sample for try. :)

Thanks in advance.

header missing, C++ Builder Seattle - by: Brian

$
0
0
Hi,

I'm not able to access std::chrono namespace. #include <chrono> throws a compiler error, not found.

Haven't been able to find a solution on other forums. Any help appreciated!

-Brian

Winhttp in Delphi tokyo 10.2.3 - by: Dimitris

$
0
0
I found that my code from 10.1 can not be compiled in 10.2 when using the winhttp api
I noticed that there are changes in winapi.WinHttp in 10.2.3 : eg
function WinHttpQueryDataAvailable(hRequest: HINTERNET; lpdwNumberOfBytesAvailable: LPDWORD): BOOL; stdcall;
In 10.1 the same function is declared as:
function WinHttpQueryDataAvailable(hRequest: HInternet; var lpdwNumberofBytesAvailable): BOOL;
The problem is that using a DWORD variable and passing its pointer gives unpredictable results.....

Delphi GIT integration with VSTS - by: Gabriel

$
0
0
I have been having a hard time getting the Delphi/GIT integration to work with our VSTS cloud hosted repository. I can easily get other git clients to work. The Delphi integration does not seem to work. When I got clone a remote repository I briefly see the VSTS login dialog and then this disappears before I am able to type in my credentials. When I get the Delphi login dialog, my credentials do not seem to work. If I clone the repository outside of Delphi then I can do a pulls and commits from within Delphi, but I cannot push back to the cloud repository. If I try to do a push back to the cloud repository I again get the Delphi login dialog and a message that says "Authentication failed for "http://...."

Am I doing something wrong here?

Indy sockets works with Windows? its android compatible? - by: Miguel

$
0
0
Hi

My code works for Windows FireMonkey on Delphi Xe8:

Server source code:
procedure TForm1.IdTCPServer1Execute(AContext: TIdContext);
var
MIRec: string;
begin

MIRec := AContext.Connection.IOHandler.ReadLn;





Memo1.Lines.Add('recebido = ' + MIRec);





end;

Client:

procedure TForm1.Button1Click(Sender: TObject);
begin
try
form1.IdTCPClient1.Host := 'localhost';
form1.IdTCPClient1.Port := 4040;
form1.IdTCPClient1.Connect;
except

ShowMessage('Connection Unsuccessful: ');
end;

form1.IdTCPClient1.IOHandler.WriteLn(edit1.text);

end;

Why my code wont works on Android? for Windows its ok...

Thanks

Documentation suggestion for Wiki / Installing - by: Lance

$
0
0
I am on subscription and renewed last month. I installed the 10.2.3 update to Tokyo and when I ran the IDE, I got stopped saying my subscription expired and can't run this version. WTH??
So I checked the License Manager and it said it expired this Feb. Hmmm. Let me click Update in the License Manager to see if I just need to pull in the updated license info. No joy, still same. So this required a contact with EMB. The gentleman I spoke verified that I did indeed renew, but verified the licensing system didn't get updated. He updated and I'm back running.
What I would suggest is a step in the documentation that suggests that if you are updating to 1 - Verify that your installed license states your subscription is current and if not, contact EMB before uninstalling old program and installing update.

opengl version - by: alfred

$
0
0
I have delphi XE5 and I use opengl.

I would know what is the version of this opengl ?

Thanks in advance,

Alfred

Tokyo 10.2.3 and Livebindings/REST packages prob - by: Lance

$
0
0
I spun up a brand new VM with Windows 10 Enterprise. Installed RAD STUDIO 10.2.3 from the ISO image.

I received several access violations in package loading that seem to stem from Livebindings and/or REST.

So now on startup, the following design time packages are disabled for me to run Delphi.

Emb REST Backend

Emb Rest - Lib Components (Designtime)

LiveBinding Expression Components FireDac

LiveBindings Expresss Components DBExpress.



I had tried a test and cloned my 10.2.2 VM and then applied the same installer and there wasn't these issues. So there is something off when doing a clean install.

10.2.3 ISO clean install problem - by: Lance

$
0
0
I spun up a brand new VM with Windows 10 Enterprise. Installed RAD STUDIO 10.2.3 from the ISO image.

<p style="font-size: 12.16px;">
I received several access violations in package loading that seem to stem from Livebindings and/or REST.

So now on startup, the following design time packages are disabled for me to run Delphi.

<p style="font-size: 12.16px;">Emb REST Backend

<p style="font-size: 12.16px;">Emb Rest - Lib Components (Designtime)

<p style="font-size: 12.16px;">LiveBinding Expression Components FireDac

<p style="font-size: 12.16px;">LiveBindings Expresss Components DBExpress.

<p style="font-size: 12.16px;">

<p style="font-size: 12.16px;">I had tried a test and cloned my 10.2.2 VM and then applied the same installer and there wasn't these issues. So there is something off when doing a clean install.

<p style="font-size: 12.16px;">

how to I force the IDE to keep compiling sources ? - by: Mark

$
0
0
how can i force the IDE to *keep compiling* the sources in a project, regardless of previous errors ?

thanks

Android Service - by: Miguel

$
0
0
Hello

What Delphi version can be used to create a Android service, a mobile application that runs on systems background?

Thanks

Need help to transfer XE5 to XE10.2 project Delphi - by: Thomas

$
0
0
Hello all,

I bought components a Long time ago. I'm a C++ deleoper but the components are written in Delphi and are not supported anymore. So I have to Transfer on my own.
I can also send the whole project with the componets if needed.
Right now I have the following problem

[DCC Fehler] Vis3DS.pas(710): E2010 incompatible type: 'Dynamic array' und 'Pointer'
Source:TMemoryStream
var NextChunk, MatChunk:TChunkHead;
smoothgroups:=pointer(integer(Source.Memory)+MatChunk.StartPos+6);

Thanks a lot
Thomas

ASA Driver for Embarcadero Delphi 10.2 - by: Sarkis

$
0
0
I am trying to connect to a Sybase Database (SQL Anywhere Version 10 / Version 17) without Success.
The problem is that I can't locate the package 'FireDACASADriver250.bpl' neither in the installation path on my system nor online.
When I add 'uses FireDAC.Phys.ASA' to my code, then I get an error message by compiling: '[dcc32 Fatal Error] Unit1.pas(10): F2613 Unit 'FireDAC.Phys.ASA' not found.'
Could maybe someone help?

Trouble with tnotificationCenter1 on win10 x64 - by: Alain

$
0
0
Hi, I have a vcl/win32app on win10, and I use this method to post notification
void TFGeneralFrame::ShowSRHint(UnicodeString sMsg)
{
UnicodeString ss=sMsg+L" - notification\r\n";
TNotification *MyNotification = NotificationCenter1->CreateNotification();
if (MyNotification==NULL) ShowMessage ("cannot create");
MyNotification->Name=L"OurTicketUpdate";
MyNotification->Title=L"Ticket Update";
MyNotification->AlertBody=sMsg;
NotificationCenter1->PresentNotification(MyNotification);
}
This works perfectly in debugging mode, step by step. But not in normal run-time mode. Any hint?

How do I access the forums? - by: Andrew

$
0
0
In the Forums menu I can see a way to start a new topic, to search and to see "rcent discussions". How can I see the entire forum? Clicking on "Forums" in the path "Home > Forums > Recent Discussions" does not go up one level.
Viewing all 3677 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>