How to Base 64 (MIME) Encode and Decode a String

Posted December 15th @ 9:27 pm by m3Rlin

MIME encoding and decoding is used when transferring binary files over the Internet. Every byte is converted to an ASCII character that can be transfered with no problems. This is the code to encode and decode using Base 64 (MIME). You can TMemo’s and TRichEdit’s string text via the Text property. The original code has [...]

How to Get a Unique File Name

Posted December 15th @ 9:24 pm by m3Rlin

You want to save data to a temporary file but you don’t what to file name to use? Well, this function does all the work for you.

function CreateUniqueFileName(sPath: string): string;
var
chTemp: Char;
begin
repeat
Randomize;
repeat
chTemp := Chr(Random(43) + 47);
[...]

« Previous Entries