while changing my project to Unicode, I found an very small bug in the use of "RegQueryValueEx" in your unit "mailtest.pas". I know that the function is no longer used with the newer operating system. You don't have to change anything, as long as it is in the forum.
Your Code:
Code: Select all
c1 := c1 * 2;
Code: Select all
c1 := c1 div 2;
Code: Select all
c1 := c1 div SizeOf(Char);
Code: Select all
SetString(result, p1, c1);
Code: Select all
SetString(result, p1, c1 div 2);
EN: http://docwiki.embarcadero.com/RADStudi ... or_Unicode
DE: http://docwiki.embarcadero.com/RADStudi ... e_anpassenIn RegQueryValueEx, the Len parameter receives and returns the number of bytes, not characters. The Unicode version thus requires twice as large value for the Len parameter.
Many greetings
Martin