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

Azure Cosmo DB signature - by: Leo

$
0
0
My project needs to connect the Azure Cosmo DB by REST API.
The Azure Cosmo DB connection requires to pass a HMACSHA256 signature to
the HTTP header. I tried to use THashSHA2.GetHMAC(Data, Key) function to get
this signature. But when I compare the result with the signature I take from C# code
(the example code in Azure webpage), they are not the same. In the C# code I saw
it converts the key to Base64String before calculating the signature.
Should I do the same step in Delphi? How to do it? Do anyone have the experience
doing the Azure Cosmo DB signature calculation?

Control '' has no parent window. (cutting/pasting components) - by: Mike

$
0
0
First, I have to say, this is a pretty awful way of doing forums. There appears to be no way to go to a specific forum category and browse posts to see if anything like the problem I'm describing has been mentioned. A search either turns up completely unrelated topics or no topics at all (if I quote the string I'm searching for).

Quite often, I start a project by throwing controls on a form as needed, making everything work, then clean up the UI by moving controls where they need to be. Often this means removing controls from the form itself, and placing them on a panel. I do this by selecting the controls in question, cutting them to the clipboard, then pasting them onto the new panel (or whatever).

From C++ Builder 3 to RAD Studio XE2, this worked fine.

Now, in the latest release (RAD Studio 10.2 Version 25.0.29899.263), trying to do this results in IDE error spam.

Here are the error details:



To reproduce, follow these steps:

1) Create a new C++ VCL forms project.
2) Add a TLabel, a TButton, and a TEdit to the default form (create if necessary).
3) Select the three new components then cut then to the clipboard.
4) Select TPanel from the tool palette, then attempt to place it on the form.

That produces an error dialog saying "Control '' has no parent window.", which repeats multiple times.

I tried to send an error report, but I don't know if it took. I ended up on a screen saying there was an XML error of some sort.

The IDE cannot be recovered after this, and because the error repeats a seemingly arbitrary number of times, killing the bds.exe process is typically necessary.

The only reliable workaround I've found thus far is to manually edit the form file to place the appropriate components inside the TPanel definition.

Azure Cosmos DB signature - by: Leo

$
0
0
My project needs to connect the Azure Cosmos DB by REST API.
The Azure Cosmo DB connection requires to pass a HMACSHA256 signature to
the HTTP header. I tried to use THashSHA2.GetHMAC(Data, Key) function to get
this signature. But when I compare the result with the signature I take from C# code
(the example code in Azure webpage), they are not the same. In the C# code I saw
it converts the key to Base64String before calculating the signature.
Should I do the same step in Delphi? How to do it? Do anyone have the experience
doing the Azure Cosmo DB signature calculation?

Updates:
I used two procedures to produce hash signature.

First one:
GenerateSignature(const AData, AKey: string): string;
var
AHMAC: TIdBytes;
bytes: TBytes;
begin
IdSSLOpenSSL.LoadOpenSSLLibrary;
if not TIdHashSHA256.IsAvailable then
raise Exception.Create('SHA-256 hashing is not available!');
with TIdHMACSHA256.Create do
try
Key := IndyTextEncoding_UTF8.GetBytes(AKey);
AHMAC := HashValue(IndyTextEncoding_UTF8.GetBytes(AData));
finally
Free;
end;
result := TNetEncoding.Base64.Encode(AHMAC);
end;

Second one:
result:= THashSHA2.GetHMAC(ACode, AKey);

None of them produce the same signature as C#

private static string GenerateMasterKeyAuthorizationSignature(string data, string key)
{
var hmacSha256 = new System.Security.Cryptography.HMACSHA256 { Key = Convert.FromBase64String(key) };
string payLoad = string.Format(System.Globalization.CultureInfo.InvariantCulture, data);
byte[] hashPayLoad = hmacSha256.ComputeHash(System.Text.Encoding.UTF8.GetBytes(payLoad));
string signature = Convert.ToBase64String(hashPayLoad);
return signature;
}

Any idea to reproduce the same signature as C# in Delphi?

Modifying Halcyon for Use With XE8 - by: Tom

$
0
0
For anyone who is interested, I have written a document that explains how to adapt the source code for Version 6.98 of Halcyon to Delphi XE8. It is a work in progress, but the current version of the effort seems to get the important things working. For the document to be of any use, you must have a license for Halcyon and have a copy of the source code to Version 6.98. Obviously, I can't supply that. If you would like to download the document, here is a link:

www.xmscorp.com/downloads/HalcyonDriverXE8.pdf

I realize that xBASE isn't exactly at the forefront of everyone's consciousness. But if, like me, you have legacy projects that use Halcyon and you're tired of splitting your time between Delphi versions, this might be useful to you.

CRC of an application in memory - by: Peter

$
0
0
What I want to do is to get is to get a CRC of the entire image of the code section of an application in memory. There are plenty of examples of getting a CRC from a piece of memory but how do I get the start and end address of the entire code segment and will windows allow me to access it? I have seen the .map file which shows the relative addresses of all code segments however I am not sure how to interpret it.

Any help gratefully received.

Peter

10.2 Tokyo Debugger not working (blue dots not showing) - by: Software

$
0
0
I've tried at least a week trying to figure out why the debugger for Builder 10.2 Tokyo is not working. It doesn't help that there's a lack of information (even on the Wiki) about this.

We recently migrated code from CB 2010 and the debugger sometimes works. It sometimes works when you clean a package and Build.

I've read somewhere that it could be related to the source files being on a network drive. When building the project, the files state "No Debug Info"

Project options are loaded from optionsets that set C++ Compiler > Debugging > Debug information to true.

Any ideas? Our projects are at a standstill because we can't perform any debugging. Thanks!

what do these topic icons mean ? - by: Roger

$
0
0
What are these "topic icons" supposed to represent ?
This random (and limited) selection of icons is sure to interpreted differently by different developers / students / Embarcadero staff / passing waifs and strays.
They are pointless. Who is designing this community forum ?
Regards Roger

how to convert current date time to UTC date time - by: Fuandi

$
0
0
Anyone know how to convert current date time to utc date time ?

AES-128 ECB decode problem (Delphi XE7) - by: Zsolt

$
0
0
Hi,

I have to decode a text, but I can not produce the good result. Now I'm using LockBox tCodec component, but I already tried other components too (SynCrypto, TntLXCryptoUtils).


Encoded text: vPxuLMVTwrM4/3RQbtntxdQa6vVVqavvJ1vQvOBO66E=
Exchange key: 8eee256O3IKOC310
The result of this function: ×q_–.íT’ԁ¦†
(The good result: This is the original text.)

What do I wrong? - I'm interested in any possible solution.

Thanks
Zsolt

MAPI fails with "None of your mail accounts could send to this recipient" - by: Keld

$
0
0
We are attempting to use MAPI to send an email (with an attachment, but the problem is the same without one). We are using the attached routine (

File Attachment:

File Name: SendMAPI_2018-05-09.zip
File Size: 1 KB
) to do so.

The problem is that we always get a bounce message back with the following content (i Danish):

Meddelelsen nåede ikke frem til nogle af eller alle de ønskede modtagere.

Emne: Faktura 45061
Sendt:09-05-2018 12:57

Der kunne ikke leveres til følgende modtager(e):

'This email address is being protected from spambots. You need JavaScript enabled to view it.' den 09-05-2018 12:57
Ingen af dine mailkonti kunne sende til denne modtager.

(Translation begins:
The message didn't arrive at some or all the intended recipients.

Subj: Invoice 45061
Sent: 09-05-2018 12:57

Could not deliver to the following recipients:

'<email>@gmail.com' on 09-05-2018 12:57
None of your mail accounts could send to this recipient.
-- Translation ends)

HOWEVER, if we copy out the recipient email address from Outlook, paste it into NotePad, copy it out from there, and paste it back into Outlook instead of the one supplied at start (this is to make a plain text version of the email address - one could also just delete the email and re-type it), then it sends correctly (when you copy out the email from outlook, the clipboard also contains a structured version of the recipient of type "Outlook 2008"-something, so by pasting it into NotePad and copying it out again, you eliminate the structured version and make sure that the clipboard only contains the plain text edition of the recipient's email address).

At the moment, we set both Name and Addr of the recipient to the same value (the email address). However, I have tried setting the name to a different value ("Sender") without it making any difference.

Can anyone shed some light on why Outlook behaves this way?

HTTPRio and Client Certificate - by: Eric

$
0
0
Hi

With the Soap server i need to call comes a Client Certificate (in my case a *.p12 file) which i installed and see in MS Tool. However i can't select it in the IDE, the ClientCertificate property, it says there are none.

How can i attach the certificate to a request?

Eric

Preparing Delphi deployment for the Android API level 26 August 2018 deadline - by: Inmatrix

$
0
0
Using Delphi 10.2.3, I have recently deployed my first Closed Alpha release using the Google Play console and was greeted with this message:

> Warnings
>
> Your app currently targets API level 14 and must target at least API
> level 26 to ensure it is built on the latest APIs optimized for
> security and performance.
>
> From August 2018, new apps must target at least Android 8.0 (API level
> 26). From November 2018, app updates must target Android 8.0 (API
> level 26).

There are several questions here with regards to Delphi deployment:
  • Delphi 10.2.3 ships with Android SDK 24.3.3, why does it warns the target API is set to level 14 and how can this be changed? (is the only option to edit AndroidManifest.template.xml?)
  • I used the Android SDK Manager tool to download the latest versions of the "Android SDK Tools", "Android SDK Platform Tools" and "SDK Platform" for Android 8.1 (API 27). However, when following the instructions ( docwiki.embarcadero.com/RADStudio/Tokyo/...dding_an_Android_SDK ), it instead installed SDK 25.2.5, even though I specified the "SDK API-Level" to "android-27" at the bottom of the wizard. How can I get SDK 27 to install?
  • I downloaded the latest Android r17 NDK ( developer.android.com/ndk/downloads/ ), but Delphi's Add SDK wizard wont accept the NDK path at all (it shows the yellow triangle), is it even possible/recommended to use the latest NDK?

Widnows' Display Settting setting - by: Ed

$
0
0
Argh... forget to check the "I'm not a robot" (even though I am logged in!) and I get to type this again.

I need to get access to the current setting of Display Settings (e.g. font size, e..g 100%) in Windows. I am having a problem charts in my reports having the wrong fonts, and think I finally can fix it.

What is the Windows API for accessing the Display Settings valeu in Windows?

Also, where are the old forums? I miss them--a lot.

Ed Dressel

Widnows' api for Display Settting setting - by: Ed

$
0
0
3rd try is the charm?
--
I have worked on a problem of putting the image of a TChart in a report for days now--and haven't had a solution. I think i finally do--but I need to get access to the current settings to Windows Display Settings (i.e. font size; e.g. 100%, 150%, 200%, etc).

Does anyone know how the API call to get the current settings for Windows' Display setting?
--
Oh, and I miss the old forums.

Ed Dressel

Delphi 10.2.3 - by: David

$
0
0
I have installed Delphi 10.2.3 Pro which apparently now includes the mobile add on pack stuff, but I cannot see how to enable any of this. The only platforms I see are Windows 32, 64 and OS X. This was installed with the web installer over 10.2 (I believe).

How do I get IOS and Android platforms enabled?

Cheers.

Тема: dclfrxtee24.% 1 не является допустимым приложением Win32 - by: Anastasia

$
0
0
Не удается загрузить пакет c:\Program файлы (x86)\FastReports\LibD24\dclfrxtee24.bpl %1 не является допустимым приложением Win32.
Почему это происходит на новой установке Berlin 10.1 update 1? Файл действительно находится в папке, показанной в сообщении об ошибке.

disconnected when heavy process DatasnapRest WebBroker - by: Marcio

$
0
0
I have a system in Rest Datasnap, which when requesting a heavy feature that takes more than 60 seconds, I am disconnected. This in the VCL application, when I call the resource in the Browser, even delaying the refuse returns the expected value. The server is in an IIS Windows Server 2008, but when I run in console mode I am offline too.

Service Application can't be started until closing another first - by: Eko

$
0
0
Dear All,

I have a problem about how to start my service application.
FYI, i have install many service application which created by Delphi.

The steps below you can follow to produce the problem:

1. Create 100 Service Application Projects
2. Build those project
3. Install it all
4. Start one by one
5. For certain number of service application started, I can't start the service application completely
6. Raise Error Message with event id: 7000

The YYYYYYY service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion

Log Name: System
Source: Service Control Manager
Date: 5/10/2018 12:09:38 PM
Event ID: 7000
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: XXXXX

7. Stop another service application that already running
8. Retry to start the service application YYYYYYY
9. YYYYYYY service can be started successfully

My question, what happen with this condition.

FYI, again, I try to start another service application that not my service can be started properly but not another my service application from Delphi.

Please give me guidance to solve or to look for the problem is

TIA

Regards,

ES

Delphi 10.2.3 - by: David

$
0
0
Inclusion of mobile support in Delphi and C++Builder Professional Edition.

Where? I have installed, uninstalled and reinstalled 10.2.3, both the ISO and web installer. Still no sign of Android or IOS as platforms. What do I need to do to get the mobile stuff going?

Regards,
Dave.

ANN: StyleControls VCL v. 3.95 just released! - by: Almediadev

$
0
0
Fellow Delphi Developers!

StyleControls VCL 3.95 just released.
www.almdev.com

In new version we added improvements to TscSplitView (analogue of TSplitView control), TscGPVirutalImageList (imagelist with dynamic, virtual size) and TscGPImage (image with dynamic size, rotation animation, clipped frame) components.

Regards,
Almediadev
Viewing all 3677 articles
Browse latest View live


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