How to Resolve a Host Name

Posted December 15th @ 1:10 pm by m3Rlin

Ever needed to convert a host name to an IP number? There is no direct routine available in Delphi for this but we can always code our way through
Here’s the code with error handling:

uses
Winsock;

// The IP number will be returned in string format in the sIP parameter
function HostToIP(sHost: string; var sIP: string): [...]

How to Find out if the CPU Supports 3DNow!

Posted December 15th @ 1:07 pm by m3Rlin

AMD K6-2, K6-III and Athlon support 3DNow! instructions. This instruction set improves 3D and multimedia performance. But before you use these in your program you may want to check if the CPU supports 3DNow! This is the code to use:

{$ifndef ver80} // Because of 32 bit register use
function Get3DNowSupport: Boolean; assembler;
[...]

« Previous EntriesNext Entries »