Α, πάλι εσύ?

Δε θα ασχοληθώ με τις βρισιές σου γιατί έχεις κάτι μαζί μου από παλιά μάλλον. Μια εμπάθεια, ένα κατιτίς.
Είσαι, άρα, (σύμφωνα με αυτούς που υποστηρίζεις, δεν το λέω εγώ, αυτοί σκέφτονται έτσι: ), αντικείμενο έρευνας και χρίζεις οπωσδήποτε ψυχανάλυσης και ίσως και ψυχοθεραπείας με φάρμακα, γιατί μόλις εκδήλωσες μια απρόκλητη προς εμένα εμπάθεια. Για να βρεθεί η αιτία της εμπάθειας, όχι τίποτα άλλο.
Σου άρεσε?
Για μένα είσαι απλά μια φοιτήτρια που έχει την δική της άποψη, έχει το θάρρος να τη λέει, έχει το θάρρος να αμφισβητεί τι λέει ένας μεγαλύτερος σε ηλικία από αυτήν και μπράβο σου, ή της τη σπάει ότι και να γράψω (δικαίωμά σου) ,μπορεί να μη σου αρέσει η αφεντομουτσουνάρα μου που μπορεί και να μη την έχεις δει (δικαίωμά σου και σιγά μη τα βάψω και μαύρα) ή μπορεί να σου τη σπάει το ψευδώνυμο Καταραμένο Αροξόλ (δεκτόν επίσης) και μόλις το βλέπεις ανεβάζεις και εσύ πίεση,
ή μπορεί να σε έχουν πειράξει άλλα πράγματα που έχω γράψει εδώ ή στη λίστα αλλά να μου επιτίθεσαι σε άσχετα τόπικ
για να μην καρφωθείς τι από όλα είναι αυτό που είπα και σε ενόχλησε τόσο πολύ (αυτό δεν μου αρέσει αλλά το κατανοώ και αυτό και το βάζω σαν μια πιθανότητα).
Έτσι και αλλιώς προσωπικά σε σένα ποτέ δεν αναφέρθηκα πριν αρχίσεις να με αποκαλείς με πολύ ωραίες εκφράσεις που μπορώ να στις θυμίσω αν δεν τις θυμάσαι.
Έλα όμως που όποιο από όλα αυτά και να συμβαίνει εγώ ΔΕΝ ΘΑ ΣΟΥ ΕΛΕΓΑ ΠΟΤΕ οτι έχεις κάποιο ψυχολογικό πρόβλημα, σε αντίθεση με εσένα που με χαρακτήρισες ψυχασθενή ως άλλη wanna be ψυχίατρος χωρίς πτυχίο αλλά κατ' επίφασην και κατ' επανάληψη.
Επειδή έπεισαν όλα τα αμερικανάκια οτι χρειάζονται ομαδική ψυχανάλυση επειδή έπεσαν 2 αεροπλάνα στους δίδυμους πύργους, δε σημαίνει οτι θα φέρουμε και εδώ αυτήν την αμερικανιά που τόσο μα τόσο πολύ προβάλλεται όλως τυχαίως από όλες τις αμερικάνικες σειρές. Ας αποδείξουν πρώτα όλοι οι ψυχολόγοι και οι ψυχίατροι οτι το αντικείμενο της επιστήμης τους (η ψυχή δηλαδή) υπάρχει και το κυριώτερο σε ποιά κλίμακα και με ποιες μονάδες μέτρησης μετράνε την ψυχική υγεία, και ας μας πούνε πως την βλέπουν και πως την εξετάζουν, και μετά ας έρθουν να μου κλάσουν και μια μάντρα @@.. Αυτή είναι η γνώμη μου για την επιστήμη τους, τι να κάνω, ελευθερία έχουμε, και τη λέω. Αυτοί ας απαντήσουν με τα δικά τους επιχειρήματα.
Πες μου οτι το έτρεξες το ερωτηματολόγιο από internet cafe και χωρίς να είσαι μέλος για να μην έχουν όντως τα πραγματικά σου στοιχεία...
Αλλά ξέχασα, ο υπολογιστής σου είναι εξαίρεση στον κανόνα και δεν αφήνει ίχνη, δεν έχει I.P. Address, δεν έχεις πάροχο Internet ο οποίος ξέρει όλα τα στοιχεία σου, ονοματεπώνυμο, διεύθυνση, αριθμό ταυτότητας, επίσης δεν παρακολουθούνται κινητά και σταθερά τηλέφωνα χωρίς εισαγγελική εντολή για κακούργημα, δεν έχει γίνει ποτέ σύλληψη κανενός από τις I.P. Διευθύνσεις που παράνομα δίνουν στις αστυνομίες οι πάροχοι internet, δεν καταγράφονται τα Chat και τα Private Chats και όλα τα μηνύματα, δεν αποθηκεύονται τα πάντα στους Servers που σερβίρουν τις σελίδες, η Alexa και οι λοιπές εταιρίας μέτρησης επισκεψιμότητας σε ρωτάνε πριν να σου καταγράφουν όλες τις επισκέψεις σου σε όλες τις ιστοσελίδες, και εγώ είμαι ο ηλίθιος που πίστευα σε τέτοια πράγματα. Επίσης είμαι ηλίθιος όπως λες επειδή με ενοχλεί το είδος των ερωτήσεων που θυμίζουν κουτσομπολιό τύπου πρωϊνάδικων - μεσημεριανάδικων σε ένα ερωτηματολόγιο που συνέταξε κάποιος και το οτι χαλαρά τη καρδία δέχεστε να συμμετάσχετε σε τέτοια ερωτηματολόγια χωρίς να σας δίνουν λογαριασμό για το που και πως θα χρησιμοποιηθούν τα δεδομένα (τρομάρα μας) που θα μαζέψουν και χωρίς να σας κοινοποιήσουν ούτε καν τα αποτελέσματα - συμπεράσματα της έρευνας να την κάνει ο Θεός, ειδικά όταν αυτοί που επεξεργάζονται τα στοιχεία συνήθως είναι παντελώς άσχετοι από στατιστική και πιθανότητες.
Μα πόσο ρόμπα γίνονται έτσι εύκολα μερικοί άνθρωποι...Επίσης ο παρακάτω κώδικας δεν υπάρχει, ούτε κάνει τίποτα, και οι προσθήκες που του έκανα ήταν άχρηστες και δεν τις χρησιμοποιήσανε ποτέ οι Administrators εκεί που δούλευα τότε, ούτε τους έλυσαν τα χέρια για αυτό που ήθελαν να κάνουν
και, τέλος οι Γερμανοί είναι φίλοι μας, τα φάγαμε όλοι μαζί και ο Ντομινίκ Στρος Καν και το ΔΝΤ είναι οι γιατροί μας

:
Λεπτομέρεια: ΔΕΝ ΕΙΠΑ ΟΤΙ ΤΑ ΜΑΖΕΥΟΥΝ ΤΑ ΣΤΟΙΧΕΙΑ ΜΑΣ. ΑΛΛΑ ΑΥΤΟ ΔΕ ΣΗΜΑΙΝΕΙ ΟΤΙ ΔΕΝ ΕΙΝΑΙ ΦΑΚΕΛΛΩΜΑ ΔΙΑΘΕΣΕΩΝ ΚΑΙ ΤΟΥ ΠΩΣ "ΔΙΑΧΕΙΡΙΖΟΜΑΣΤΕ" ΤΟΝ ΧΡΟΝΟ ΜΑΣ.// {*************************************************************************}
/// <summary>
///
Όταν καταλάβεις τι κάνει ο παρακάτω κώδικας, έλα να με ξαναβρίσεις./// </summary>
unit IpHlpApi;
{$ALIGN ON}
{$MINENUMSIZE 4}
{$WEAKPACKAGEUNIT}
interface
uses
Windows;
const
ANI_SIZE = 1;
MAX_ADAPTER_NAME = 128;
MAX_INTERFACE_NAME_LEN = 256;
MAXLEN_IFDESCR = 256;
MAXLEN_PHYSADDR = 8;
{ Definitions used by getnetworkparams and getadaptersinfo apis }
MAX_ADAPTER_DESCRIPTION_LENGTH = 128;
MAX_ADAPTER_NAME_LENGTH = 256;
MAX_ADAPTER_ADDRESS_LENGTH = 8;
DEFAULT_MINIMUM_ENTITIES = 32;
MAX_HOSTNAME_LEN = 128;
MAX_DOMAIN_NAME_LEN = 128;
MAX_SCOPE_ID_LEN = 256;
{ Node Type }
BROADCAST_NODETYPE = 1;
PEER_TO_PEER_NODETYPE = 2;
MIXED_NODETYPE = 4;
HYBRID_NODETYPE = 8;
{ Adapter Type }
IF_OTHER_ADAPTERTYPE = 0;
IF_ETHERNET_ADAPTERTYPE = 1;
IF_TOKEN_RING_ADAPTERTYPE = 2;
IF_FDDI_ADAPTERTYPE = 3;
IF_PPP_ADAPTERTYPE = 4;
IF_LOOPBACK_ADAPTERTYPE = 5;
IF_SLIP_ADAPTERTYPE = 6;
{ Specifies the state of the TCP connection }
MIB_TCP_STATE_CLOSED = 1;
MIB_TCP_STATE_LISTEN = 2;
MIB_TCP_STATE_SYN_SENT = 3;
MIB_TCP_STATE_SYN_RCVD = 4;
MIB_TCP_STATE_ESTAB = 5;
MIB_TCP_STATE_FIN_WAIT1 = 6;
MIB_TCP_STATE_FIN_WAIT2 = 7;
MIB_TCP_STATE_CLOSE_WAIT = 8;
MIB_TCP_STATE_CLOSING = 9;
MIB_TCP_STATE_LAST_ACK = 10;
MIB_TCP_STATE_TIME_WAIT = 11;
MIB_TCP_STATE_DELETE_TCB = 12;
{ Specifies the type of ARP entry }
MIB_IPNET_TYPE_OTHER = 1;
MIB_IPNET_TYPE_INVALID = 2;
MIB_IPNET_TYPE_DYNAMIC = 3;
MIB_IPNET_TYPE_STATIC = 4;
{ Specifies the route type }
MIB_IPROUTE_TYPE_OTHER = 1;
MIB_IPROUTE_TYPE_INVALID = 2;
MIB_IPROUTE_TYPE_DIRECT = 3;
MIB_IPROUTE_TYPE_INDIRECT = 4;
{ Specifies the retransmission timeout algorithm }
MIB_TCP_RTO_OTHER = 1;
MIB_TCP_RTO_CONSTANT = 2;
MIB_TCP_RTO_RSRE = 3;
MIB_TCP_RTO_VANJ = 4;
{ Specifies whether IP forwarding is enabled or disabled }
MIB_IP_FORWARDING = 1;
MIB_IP_NOT_FORWARDING = 2;
{ The interface is administratively enabled or disabled }
MIB_IF_ADMIN_STATUS_UP = 1;
MIB_IF_ADMIN_STATUS_DOWN = 2;
{ The operational status of the interface }
MIB_IF_OPER_STATUS_NON_OPERATIONAL = 0;
MIB_IF_OPER_STATUS_UNREACHABLE = 1;
MIB_IF_OPER_STATUS_DISCONNECTED = 2;
MIB_IF_OPER_STATUS_CONNECTING = 3;
MIB_IF_OPER_STATUS_CONNECTED = 4;
MIB_IF_OPER_STATUS_OPERATIONAL = 5;
{ IP Protocol Identifiers }
IPRTRMGR_PID = 10000;
MIB_IPPROTO_OTHER = 1;
MIB_IPPROTO_LOCAL = 2;
MIB_IPPROTO_NETMGMT = 3;
MIB_IPPROTO_ICMP = 4;
MIB_IPPROTO_EGP = 5;
MIB_IPPROTO_GGP = 6;
MIB_IPPROTO_HELLO = 7;
MIB_IPPROTO_RIP = 8;
MIB_IPPROTO_IS_IS = 9;
MIB_IPPROTO_ES_IS = 10;
MIB_IPPROTO_CISCO = 11;
MIB_IPPROTO_BBN = 12;
MIB_IPPROTO_OSPF = 13;
MIB_IPPROTO_BGP = 14;
MIB_IPPROTO_BOOTP = 9999;
MIB_IPPROTO_NT_AUTOSTATIC = 10002;
MIB_IPPROTO_NT_STATIC = 10006;
MIB_IPPROTO_NT_STATIC_NON_DOD = 10007;
{ IPX Protocol Identifiers }
IPX_PROTOCOL_BASE = $0001FFFF;
IPX_PROTOCOL_RIP = IPX_PROTOCOL_BASE + 1;
IPX_PROTOCOL_SAP = IPX_PROTOCOL_BASE + 2;
IPX_PROTOCOL_NLSP = IPX_PROTOCOL_BASE + 3;
{ IP Helper Type Definitions }
type
TIPAddr = DWORD;
TIPMask = DWORD;
PIpAddressString = ^TIpAddressString;
TIpAddressString = packed record
str: array[0..15] of Char;
end;
PIpMaskString = ^TIpMaskString;
TIpMaskString = TIpAddressString;
PIpAddrString = ^TIpAddrString;
TIpAddrString = packed record
Next: PIpAddrString;
IpAddress: TIpAddressString;
IpMask: TIpMaskString;
Context: DWORD;
end;
PIpAdapterInfo = ^TIpAdapterInfo;
TIpAdapterInfo = packed record
Next: PIpAdapterInfo;
ComboIndex: DWORD;
AdapterName: array[0..MAX_ADAPTER_NAME_LENGTH + 3] of Char;
Description: array[0..MAX_ADAPTER_DESCRIPTION_LENGTH + 3] of Char;
AddressLength: UINT;
Address: array[0..MAX_ADAPTER_ADDRESS_LENGTH - 1] of BYTE;
Index: DWORD;
uType: UINT;
DhcpEnabled: UINT;
CurrentIpAddress: PIpAddrString;
IpAddressList: TIpAddrString;
GatewayList: TIpAddrString;
DhcpServer: TIpAddrString;
HaveWins: BOOL;
PrimaryWinsServer: TIpAddrString;
SecondaryWinsServer: TIpAddrString;
LeaseObtained: Longint;
LeaseExpires: Longint;
end;
PIpPerAdapterInfo = ^TIpPerAdapterInfo;
TIpPerAdapterInfo = packed record
AutoconfigEnabled: UINT;
AutoconfigActive: UINT;
CurrentDnsServer: PIpAddrString;
DnsServerList: TIpAddrString;
end;
PIpUnidirectionalAdapterAddress = ^TIpUnidirectionalAdapterAddress;
TIpUnidirectionalAdapterAddress = packed record
NumAdapters: ULONG;
Address: array[0..ANI_SIZE - 1] of TIPAddr;
end;
PIpAdapterIndexMap = ^TIpAdapterIndexMap;
TIpAdapterIndexMap = packed record
Index: ULONG; { adapter index }
Name: array[0..MAX_ADAPTER_NAME - 1] of WCHAR; { name of the adapter }
end;
PIpInterfaceInfo = ^TIpInterfaceInfo;
TIpInterfaceInfo = packed record
NumAdapters: Longint; { number of adapters in array }
Adapter: array[0..ANI_SIZE - 1] of TIpAdapterIndexMap; { adapter indices and names }
end;
PFixedInfo = ^TFixedInfo;
TFixedInfo = packed record
HostName: array[0..MAX_HOSTNAME_LEN + 3] of Char;
DomainName: array[0..MAX_DOMAIN_NAME_LEN + 3] of Char;
CurrentDnsServer: PIpAddrString;
DnsServerList: TIpAddrString;
NodeType: UINT;
ScopeId: array[0..MAX_SCOPE_ID_LEN + 3] of Char;
EnableRouting: UINT;
EnableProxy: UINT;
EnableDns: UINT;
end;
PMibIpForwardRow = ^TMibIpForwardRow;
TMibIpForwardRow = packed record
dwForwardDest: DWORD; { IP addr of destination }
dwForwardMask: DWORD; { subnetwork mask of destination }
dwForwardPolicy: DWORD; { conditions for multi-path route }
dwForwardNextHop: DWORD; { IP address of next hop }
dwForwardIfIndex: DWORD; { index of interface }
dwForwardType: DWORD; { route type }
dwForwardProto: DWORD; { protocol that generated route }
dwForwardAge: DWORD; { age of route }
dwForwardNextHopAS: DWORD; { autonomous system number of next hop }
dwForwardMetric1: DWORD; { protocol-specific metric }
dwForwardMetric2: DWORD; { protocol-specific metric }
dwForwardMetric3: DWORD; { protocol-specific metric }
dwForwardMetric4: DWORD; { protocol-specific metric }
dwForwardMetric5: DWORD; { protocol-specific metric }
end;
PMibIpNetRow = ^TMibIpNetRow;
TMibIpNetRow = packed record
dwIndex: DWORD; { adapeter index }
dwPhysAddrLen: DWORD; { physical address length }
bPhysAddr: array[0..MAXLEN_PHYSADDR - 1] of BYTE; { physical address }
dwAddr: DWORD; { IP address }
dwType: DWORD; { ARP entry type }
end;
PMibIcmpStats = ^TMibIcmpStats;
TMibIcmpStats = packed record
dwMsgs: DWORD; { number of messages }
dwErrors: DWORD; { number of errors }
dwDestUnreachs: DWORD; { destination unreachable messages }
dwTimeExcds: DWORD; { time-to-live exceeded messages }
dwParmProbs: DWORD; { parameter problem messages }
dwSrcQuenchs: DWORD; { source quench messages }
dwRedirects: DWORD; { redirection messages }
dwEchos: DWORD; { echo requests }
dwEchoReps: DWORD; { echo replies }
dwTimestamps: DWORD; { timestamp requests }
dwTimestampReps: DWORD; { timestamp replies }
dwAddrMasks: DWORD; { address mask requests }
dwAddrMaskReps: DWORD; { address mask replies }
end;
PMibIcmpInfo = ^TMibIcmpInfo;
TMibIcmpInfo = packed record
icmpInStats: TMibIcmpStats; { stats for incoming messages }
icmpOutStats: TMibIcmpStats; { stats for outgoing messages }
end;
PMibIcmp = ^TMibIcmp;
TMibIcmp = packed record
stats: TMibIcmpInfo; { contains ICMP stats }
end;
PMibIfRow = ^TMibIfRow;
TMibIfRow = packed record
wszName: array[0..MAX_INTERFACE_NAME_LEN - 1] of WCHAR;
dwIndex: DWORD; { index of the interface }
dwType: DWORD; { type of interface }
dwMtu: DWORD; { max transmission unit }
dwSpeed: DWORD; { speed of the interface }
dwPhysAddrLen: DWORD; { length of physical address }
bPhysAddr: array[0..MAXLEN_PHYSADDR - 1] of BYTE; { physical addr of adapter }
dwAdminStatus: DWORD; { administrative status }
dwOperStatus: DWORD; { operational status }
dwLastChange: DWORD; { last time oper status changed }
dwInOctets: DWORD; { octets received }
dwInUcastPkts: DWORD; { unicast packets received }
dwInNUcastPkts: DWORD; { non-unicast packets received }
dwInDiscards: DWORD; { received packets discarded }
dwInErrors: DWORD; { erroneous packets received }
dwInUnknownProtos: DWORD; { unknow protocol packets received }
dwOutOctets: DWORD; { octets sent }
dwOutUcastPkts: DWORD; { unicast packets sent }
dwOutNUcastPkts: DWORD; { non-unicast packets sent }
dwOutDiscards: DWORD; { outgoing packets discarded }
dwOutErrors: DWORD; { erroneous packets sent }
dwOutQLen: DWORD; { output queue length }
dwDescrLen: DWORD; { length of bDescr member }
bDescr: array[0..MAXLEN_IFDESCR - 1] of BYTE; { interface description }
end;
PMibIfTable = ^TMibIfTable;
TMibIfTable = packed record
dwNumEntries: DWORD; { number of entries in table }
table: array[0..ANI_SIZE - 1] of TMibIfRow; { array of interface entries }
end;
PMibIpAddrRow = ^TMibIpAddrRow;
TMibIpAddrRow = packed record
dwAddr: DWORD; { IP address }
dwIndex: DWORD; { interface index }
dwMask: DWORD; { subnet mask }
dwBCastAddr: DWORD; { broadcast address }
dwReasmSize: DWORD; { rassembly size }
unused1: WORD; { not currently used }
unused2: WORD; { not currently used }
end;
PMibIpAddrTable = ^TMibIpAddrTable;
TMibIpAddrTable = packed record
dwNumEntries: DWORD; { number of entries in the table }
table: array[0..ANI_SIZE - 1] of TMibIpAddrRow; { array of IP address entries }
end;
PMibIpForwardTable = ^TMibIpForwardTable;
TMibIpForwardTable = packed record
dwNumEntries: DWORD; { number of entries in the table }
table: array[0..ANI_SIZE - 1] of TMibIpForwardRow; { array of route entries }
end;
PMibIpNetTable = ^TMibIpNetTable;
TMibIpNetTable = packed record
dwNumEntries: DWORD; { number of entries in table }
table: array[0..ANI_SIZE - 1] of TMibIpNetRow; { array of ARP entries }
end;
PMibIpStats = ^TMibIpStats;
TMibIpStats = packed record
dwForwarding: DWORD; { IP forwarding enabled or disabled }
dwDefaultTTL: DWORD; { default time-to-live }
dwInReceives: DWORD; { datagrams received }
dwInHdrErrors: DWORD; { received header errors }
dwInAddrErrors: DWORD; { received address errors }
dwForwDatagrams: DWORD; { datagrams forwarded }
dwInUnknownProtos: DWORD; { datagrams with unknown protocol }
dwInDiscards: DWORD; { received datagrams discarded }
dwInDelivers: DWORD; { received datagrams delivered }
dwOutRequests: DWORD;
dwRoutingDiscards: DWORD;
dwOutDiscards: DWORD; { sent datagrams discarded }
dwOutNoRoutes: DWORD; { datagrams for which no route }
dwReasmTimeout: DWORD; { datagrams for which all frags didn't arrive }
dwReasmReqds: DWORD; { datagrams requiring reassembly }
dwReasmOks: DWORD; { successful reassemblies }
dwReasmFails: DWORD; { failed reassemblies }
dwFragOks: DWORD; { successful fragmentations }
dwFragFails: DWORD; { failed fragmentations }
dwFragCreates: DWORD; { datagrams fragmented }
dwNumIf: DWORD; { number of interfaces on computer }
dwNumAddr: DWORD; { number of IP address on computer }
dwNumRoutes: DWORD; { number of routes in routing table }
end;
PMibTcpStats = ^TMibTcpStats;
TMibTcpStats = packed record
dwRtoAlgorithm: DWORD; { timeout algorithm }
dwRtoMin: DWORD; { minimum timeout }
dwRtoMax: DWORD; { maximum timeout }
dwMaxConn: DWORD; { maximum connections }
dwActiveOpens: DWORD; { active opens }
dwPassiveOpens: DWORD; { passive opens }
dwAttemptFails: DWORD; { failed attempts }
dwEstabResets: DWORD; { establised connections reset }
dwCurrEstab: DWORD; { established connections }
dwInSegs: DWORD; { segments received }
dwOutSegs: DWORD; { segment sent }
dwRetransSegs: DWORD; { segments retransmitted }
dwInErrs: DWORD; { incoming errors }
dwOutRsts: DWORD; { outgoing resets }
dwNumConns: DWORD; { cumulative connections }
end;
PMibTcpRow = ^TMibTcpRow;
TMibTcpRow = packed record
dwState: DWORD; { state of the connection }
dwLocalAddr: DWORD; { address on local computer }
dwLocalPort: DWORD; { port number on local computer }
dwRemoteAddr: DWORD; { address on remote computer }
dwRemotePort: DWORD; { port number on remote computer }
end;
PMibTcpTable = ^TMibTcpTable;
TMibTcpTable = packed record
dwNumEntries: DWORD; { number of entries in the table }
table: array[0..ANI_SIZE - 1] of TMibTcpRow; { array of TCP connections }
end;
PMibUdpStats = ^TMibUdpStats;
TMibUdpStats = packed record
dwInDatagrams: DWORD; { received datagrams }
dwNoPorts: DWORD; { datagrams for which no port }
dwInErrors: DWORD; { errors on received datagrams }
dwOutDatagrams: DWORD; { sent datagrams }
dwNumAddrs: DWORD; { number of entries in UDP listener table }
end;
PMibUdpRow = ^TMibUdpRow;
TMibUdpRow = packed record
dwLocalAddr: DWORD; { IP address on local computer }
dwLocalPort: DWORD; { port number on local computer }
end;
PMibUdpTable = ^TMibUdpTable;
TMibUdpTable = packed record
dwNumEntries: DWORD; { number of entries in the table }
table: array[0..ANI_SIZE - 1] of TMibUdpRow; { table of MIB_UDPROW structs }
end;
{IP Helper API Prototypes }
function AddIPAddress(Address: TIPAddr; IpMask: TIPMask; IfIndex: DWORD;
NTEContext, NTEInstance: PULONG): DWORD; stdcall;
function CreateIpForwardEntry(pRoute: PMibIpForwardRow): DWORD; stdcall;
function CreateIpNetEntry(pArpEntry: PMibIpNetRow): DWORD; stdcall;
function CreateProxyArpEntry(dwAddress, dwMask, dwIfIndex: DWORD): DWORD; stdcall;
function DeleteIPAddress(NTEContext: ULONG): DWORD; stdcall;
function DeleteIpForwardEntry(pRoute: PMibIpForwardRow): DWORD; stdcall;
function DeleteIpNetEntry(pArpEntry: PMibIpNetRow): DWORD; stdcall;
function DeleteProxyArpEntry(dwAddress, dwMask, dwIfIndex: DWORD): DWORD; stdcall;
function EnableRouter(pHandle: PHandle; pOverlapped: POverlapped): DWORD; stdcall;
function FlushIpNetTable(dwIfIndex: DWORD): DWORD; stdcall;
function GetAdapterIndex(AdapterName: LPWSTR; IfIndex: PULONG): DWORD; stdcall;
function GetAdaptersInfo(pAdapterInfo: PIpAdapterInfo; pOutBufLen: PULONG): DWORD; stdcall;
function GetBestInterface(dwDestAddr: TIPAddr; pdwBestIfIndex: PDWORD): DWORD; stdcall;
function GetBestRoute(dwDestAddr, dwSourceAddr: DWORD; pBestRoute: PMibIpForwardRow): DWORD; stdcall;
function GetFriendlyIfIndex(IfIndex: DWORD): DWORD; stdcall;
function GetIcmpStatistics(pStats: PMibIcmp): DWORD; stdcall;
function GetIfEntry(pIfRow: PMibIfRow): DWORD; stdcall;
function GetIfTable(pIfTable: PMibIfTable; pdwSize: PULONG; bOrder: BOOL): DWORD; stdcall;
function GetInterfaceInfo(pIfTable: PIpInterfaceInfo; dwOutBufLen: PULONG):DWORD; stdcall;
function GetIpAddrTable(pIpAddrTable: PMibIpAddrTable; pdwSize: PULONG; bOrder: BOOL): DWORD; stdcall;
function GetIpForwardTable(pIpForwardTable: PMibIpForwardTable; pdwSize: PULONG; bOrder: BOOL): DWORD; stdcall;
function GetIpNetTable(pIpNetTable: PMibIpNetTable; pdwSize: PULONG; bOrder: BOOL): DWORD; stdcall;
function GetIpStatistics(pStats: PMibIpStats): DWORD; stdcall;
function GetNetworkParams(pFixedInfo: PFixedInfo; pOutBufLen: PULONG): DWORD; stdcall;
function GetNumberOfInterfaces(pdwNumIf: PDWORD): DWORD; stdcall;
function GetPerAdapterInfo(IfIndex: ULONG; pPerAdapterInfo: PIpPerAdapterInfo;
pOutBufLen: PULONG): DWORD; stdcall;
function GetRTTAndHopCount(DestIpAddress: TIPAddr; HopCount: PULONG;
MaxHops: ULONG; RTT: PULONG): BOOL; stdcall;
function GetTcpStatistics(pStats: PMibTcpStats): DWORD; stdcall;
function GetTcpTable(pTcpTable: PMibTcpTable; pdwSize: PDWORD; bOrder: BOOL): DWORD; stdcall;
function GetUdpStatistics(pStats: PMibUdpStats): DWORD; stdcall;
function GetUdpTable(pUdpTable: PMibUdpTable; pdwSize: PDWORD; bOrder: BOOL): DWORD; stdcall;
function GetUniDirectionalAdapterInfo(pIPIfInfo: PIpUnidirectionalAdapterAddress;
dwOutBufLen: PULONG): DWORD; stdcall;
function IpReleaseAddress(AdapterInfo: PIpAdapterIndexMap): DWORD; stdcall;
function IpRenewAddress(AdapterInfo: PIpAdapterIndexMap): DWORD; stdcall;
function NotifyAddrChange(Handle: PHandle; overlapped: POverlapped): DWORD; stdcall;
function NotifyRouteChange(Handle: PHandle; overlapped: POverlapped): DWORD; stdcall;
function SendARP(DestIP, SrcIP: TIPAddr; pMacAddr, PhyAddrLen: PULONG): DWORD; stdcall;
function SetIfEntry(pIfRow: PMibIfRow): DWORD; stdcall;
function SetIpForwardEntry(pRoute: PMibIpForwardRow): DWORD; stdcall;
function SetIpNetEntry(pArpEntry: PMibIpNetRow): DWORD; stdcall;
function SetIpStatistics(pIpStats: PMibIpStats): DWORD; stdcall;
function SetIpTTL(nTTL: UINT): DWORD; stdcall;
function SetTcpEntry(pTcpRow: PMibTcpRow): DWORD; stdcall;
function UnenableRouter(pOverlapped: POverlapped; lpdwEnableCount: LPDWORD): DWORD; stdcall;
implementation
const
iphelper = 'iphlpapi.dll';
function AddIPAddress; external iphelper name 'AddIPAddress';
function CreateIpForwardEntry; external iphelper name 'CreateIpForwardEntry';
function CreateIpNetEntry; external iphelper name 'CreateIpNetEntry';
function CreateProxyArpEntry; external iphelper name 'CreateProxyArpEntry';
function DeleteIPAddress; external iphelper name 'DeleteIPAddress';
function DeleteIpForwardEntry; external iphelper name 'DeleteIpForwardEntry';
function DeleteIpNetEntry; external iphelper name 'DeleteIpNetEntry';
function DeleteProxyArpEntry; external iphelper name 'DeleteProxyArpEntry';
function EnableRouter; external iphelper name 'EnableRouter';
function FlushIpNetTable; external iphelper name 'FlushIpNetTable';
function GetAdapterIndex; external iphelper name 'GetAdapterIndex';
function GetAdaptersInfo; external iphelper name 'GetAdaptersInfo';
function GetBestInterface; external iphelper name 'GetBestInterface';
function GetBestRoute; external iphelper name 'GetBestRoute';
function GetFriendlyIfIndex; external iphelper name 'GetFriendlyIfIndex';
function GetIcmpStatistics; external iphelper name 'GetIcmpStatistics';
function GetIfEntry; external iphelper name 'GetIfEntry';
function GetIfTable; external iphelper name 'GetIfTable';
function GetInterfaceInfo; external iphelper name 'GetInterfaceInfo';
function GetIpAddrTable; external iphelper name 'GetIpAddrTable';
function GetIpForwardTable; external iphelper name 'GetIpForwardTable';
function GetIpNetTable; external iphelper name 'GetIpNetTable';
function GetIpStatistics; external iphelper name 'GetIpStatistics';
function GetNetworkParams; external iphelper name 'GetNetworkParams';
function GetNumberOfInterfaces; external iphelper name 'GetNumberOfInterfaces';
function GetPerAdapterInfo; external iphelper name 'GetPerAdapterInfo';
function GetRTTAndHopCount; external iphelper name 'GetRTTAndHopCount';
function GetTcpStatistics; external iphelper name 'GetTcpStatistics';
function GetTcpTable; external iphelper name 'GetTcpTable';
function GetUdpStatistics; external iphelper name 'GetUdpStatistics';
function GetUdpTable; external iphelper name 'GetUdpTable';
function GetUniDirectionalAdapterInfo; external iphelper name 'GetUniDirectionalAdapterInfo';
function IpReleaseAddress; external iphelper name 'IpReleaseAddress';
function IpRenewAddress; external iphelper name 'IpRenewAddress';
function NotifyAddrChange; external iphelper name 'NotifyAddrChange';
function NotifyRouteChange; external iphelper name 'NotifyRouteChange';
function SendARP; external iphelper name 'SendARP';
function SetIfEntry; external iphelper name 'SetIfEntry';
function SetIpForwardEntry; external iphelper name 'SetIpForwardEntry';
function SetIpNetEntry; external iphelper name 'SetIpNetEntry';
function SetIpStatistics; external iphelper name 'SetIpStatistics';
function SetIpTTL; external iphelper name 'SetIpTTL';
function SetTcpEntry; external iphelper name 'SetTcpEntry';
function UnenableRouter; external iphelper name 'UnenableRouter';
end.
unit Main;
{$R-}
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Menus, ComCtrls, ToolWin, ExtCtrls, ImgList, ActnList, IpHlpApi, ShellAPI;
const
WM_WNETSTATICON = WM_USER + 1;
WM_LOOKUPCOMPLETE = WM_USER + 2;
type
TMainForm = class(TForm)
MainMenu: TMainMenu;
miFile: TMenuItem;
miView: TMenuItem;
miHelp: TMenuItem;
StatusBar: TStatusBar;
ListViewImages: TImageList;
miSave: TMenuItem;
miSaveAs: TMenuItem;
N1: TMenuItem;
miExit: TMenuItem;
miAbout: TMenuItem;
miRefresh: TMenuItem;
ListView: TListView;
TrayIconPopupMenu: TPopupMenu;
piOpen: TMenuItem;
N9: TMenuItem;
piExit: TMenuItem;
miTrayIcon: TMenuItem;
miToolBar: TMenuItem;
miStatusBar: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
miConnections: TMenuItem;
miIP: TMenuItem;
miICMP: TMenuItem;
miTCP: TMenuItem;
miUDP: TMenuItem;
miInterface: TMenuItem;
miRoute: TMenuItem;
ActionList: TActionList;
actSave: TAction;
actSaveAs: TAction;
actExit: TAction;
actToolBar: TAction;
actStatusBar: TAction;
actAbout: TAction;
actByName: TAction;
actAllEndpoints: TAction;
actTrayIcon: TAction;
ToolBar: TToolBar;
BtnSave: TToolButton;
ToolButton1: TToolButton;
BtnRefresh: TToolButton;
ToolButton2: TToolButton;
BtnViews: TToolButton;
MainPopupMenuActions: TPopupMenu;
piRoute: TMenuItem;
piICMP: TMenuItem;
piConnections: TMenuItem;
piIP: TMenuItem;
piInterface: TMenuItem;
piTCP: TMenuItem;
piUDP: TMenuItem;
actConnections: TAction;
actIP: TAction;
actICMP: TAction;
actTCP: TAction;
actUDP: TAction;
actInterface: TAction;
actRoute: TAction;
N7: TMenuItem;
piByName: TMenuItem;
piAllEndpoints: TMenuItem;
actRefresh: TAction;
TbrLargeImages: TImageList;
TbrLargeHotImages: TImageList;
TbrImages: TImageList;
TbrHotImages: TImageList;
ViewModePopupMenu: TPopupMenu;
actLabels: TAction;
actIcons: TAction;
piText: TMenuItem;
piIcons: TMenuItem;
actOpen: TAction;
actTerminate: TAction;
Splitter: TSplitter;
actNIC: TAction;
actARP: TAction;
actIPAddress: TAction;
piARP: TMenuItem;
piIPAddress: TMenuItem;
piNIC: TMenuItem;
miARP: TMenuItem;
miIPAddress: TMenuItem;
miNIC: TMenuItem;
N4: TMenuItem;
actCloseConnection: TAction;
N8: TMenuItem;
piCloseConnection: TMenuItem;
Timer: TTimer;
actOptions: TAction;
N6: TMenuItem;
miOptions: TMenuItem;
actAutoRefresh: TAction;
AutoRefresh1: TMenuItem;
N5: TMenuItem;
BtnCloseConnection: TToolButton;
BtnExit: TToolButton;
miCloseConnection: TMenuItem;
CloseSelectedConnectionsWhere: TMenuItem;
actCloseSelectedConnections: TAction;
actCloseSelectedConnectionsWith: TAction;
ToolButton5: TToolButton;
ToolButton3: TToolButton;
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormDestroy(Sender: TObject);
procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
procedure ListViewCompare(Sender: TObject; Item1, Item2: TListItem;
Data: Integer; var Compare: Integer);
procedure ListViewDeletion(Sender: TObject; Item: TListItem);
procedure actSaveExecute(Sender: TObject);
procedure actSaveAsExecute(Sender: TObject);
procedure actExitExecute(Sender: TObject);
procedure actToolBarExecute(Sender: TObject);
procedure actStatusBarExecute(Sender: TObject);
procedure actTrayIconExecute(Sender: TObject);
procedure actByNameExecute(Sender: TObject);
procedure actAllEndpointsExecute(Sender: TObject);
procedure actCloseConnectionExecute(Sender: TObject);
procedure actRefreshExecute(Sender: TObject);
procedure actAboutExecute(Sender: TObject);
procedure actLabelsExecute(Sender: TObject);
procedure actIconsExecute(Sender: TObject);
procedure actOpenExecute(Sender: TObject);
procedure actTerminateExecute(Sender: TObject);
procedure ActionExecute(Sender: TObject);
procedure ActionListUpdate(Action: TBasicAction; var Handled: Boolean);
procedure SplitterCanResize(Sender: TObject; var NewSize: Integer;
var Accept: Boolean);
procedure BtnViewsClick(Sender: TObject);
procedure TimerTimer(Sender: TObject);
procedure actOptionsExecute(Sender: TObject);
procedure actAutoRefreshExecute(Sender: TObject);
procedure MainPopupMenuActionsPopup(Sender: TObject);
procedure CloseSelectedConnectionsWhereClick(Sender: TObject);
procedure CloseSelectedConnectionsClick(Sender: TObject);
procedure actCloseSelectedConnectionsWithExecute(Sender: TObject);
procedure actCloseSelectedConnectionsExecute(Sender: TObject);
private
{ Private declarations }
FNotifyIconData: TNotifyIconData;
FDone: Boolean;
FAscending: Boolean;
FByNameChanged: Boolean;
FAllEndpointsChanged: Boolean;
FAppendStatistics: Boolean;
FAutoSave: Boolean;
FAction: Integer;
FSortCol: Integer;
FHostName: array[0..255] of Char;
FFileName: string;
function GetActionIndexByTag(ATag: Integer): Integer;
function GetHost(dwIpAddr: DWORD; Local: Boolean; DataAddr: Pointer = nil): string;
function GetPort(dwPort: DWORD; const Proto: string): string;
function ProcessIdToName(Pid: DWORD): string;
procedure GetNicTable(ReNew: Boolean);
procedure GetArpTable(ReNew: Boolean);
procedure GetIpAddressTable(ReNew: Boolean);
procedure GetRouteTable(ReNew: Boolean);
procedure GetConnectionsTable(ReNew: Boolean);
procedure GetInterfaceStats(ReNew: Boolean);
procedure GetIpStats(ReNew: Boolean);
procedure GetIcmpStats(ReNew: Boolean);
procedure GetTcpStats(ReNew: Boolean);
procedure GetUdpStats(ReNew: Boolean);
procedure AddIcon;
procedure MkFile(const FileName: string; AppendFlag: Boolean);
protected
procedure WndProc(var Message: TMessage); override;
procedure WMWNetStatIcon(var Message: TMessage); message WM_WNETSTATICON;
procedure WMLookupComplete(var Message: TMessage); message WM_LOOKUPCOMPLETE;
public
{ Public declarations }
end;
PMibTcpExRow = ^TMibTcpExRow;
TMibTcpExRow = packed record
dwState: DWORD;
dwLocalAddr: DWORD;
dwLocalPort: DWORD;
dwRemoteAddr: DWORD;
dwRemotePort: DWORD;
dwProcessId: DWORD;
end;
PMibTcpExTable = ^TMibTcpExTable;
TMibTcpExTable = packed record
dwNumEntries: DWORD;
table: array[0..ANI_SIZE - 1] of TMibTcpExRow;
end;
PMibUdpExRow = ^TMibUdpExRow;
TMibUdpExRow = packed record
dwLocalAddr: DWORD;
dwLocalPort: DWORD;
dwProcessId: DWORD;
end;
PMibUdpExTable = ^TMibUdpExTable;
TMibUdpExTable = packed record
dwNumEntries: DWORD;
table: array[0..ANI_SIZE - 1] of TMibUdpExRow;
end;
PTcpData = ^TTcpData;
TTcpData = packed record
TcpRow: TMibTcpRow;
LookupHandle: THandle;
HostData: Pointer;
end;
TAllocateAndGetTcpExTableFromStack = function(pTcpExTable: PMibTcpExTable;
bOrder: BOOL; heap: THandle; dwZero, dwFlags: DWORD): DWORD; stdcall;
TAllocateAndGetUdpExTableFromStack = function(pUdpExTable: PMibUdpExTable;
bOrder: BOOL; heap: THandle; dwZero, dwFlags: DWORD): DWORD; stdcall;
const
PID_SIZE = SizeOf(TMibTcpExRow) - SizeOf(TMibTcpRow);
var
MainForm: TMainForm
GetTcpExTable: TAllocateAndGetTcpExTableFromStack = nil
GetUdpExTable: TAllocateAndGetUdpExTableFromStack = nil
FoundExApi: Boolean = False
TaskMessage: UINT
implementation
uses
NsOptions, NsAbout, NsConst, WinSock, Registry, TlHelp32, ErrorH
{$R *.dfm}
// {*************************************************************************}
/// <summary>
/// Διαδικασία InitExApi
/// </summary>
procedure InitExApi;
var
hLib: HMODULE;
begin
hLib := GetModuleHandle('iphlpapi.dll');
@GetTcpExTable := GetProcAddress(hLib, 'AllocateAndGetTcpExTableFromStack');
@GetUdpExTable := GetProcAddress(hLib, 'AllocateAndGetUdpExTableFromStack');
if Assigned(GetTcpExTable) and Assigned(GetUdpExTable) then
FoundExApi := True;
end; // Τέλος της Διαδικασίας
// {*************************************************************************}
/// <summary>
/// Διαδικασία Check ResultCode
/// </summary>
procedure Check(ResultCode: DWORD);
begin
if ResultCode <> NO_ERROR then
raise Exception.Create(SysErrorMessage(ResultCode));
end; // Τέλος της Διαδικασίας
// {*************************************************************************}
/// <summary>
/// Συνάρτηση FormatIpAddress
/// </summary>
function FormatIpAddress(Value: DWORD): string;
begin
Result := Format('%d.%d.%d.%d', [Value and $FF,
(Value shr 8) and $FF,
(Value shr 16) and $FF,
(Value shr 24) and $FF]);
end; // Τέλος της Συνάρτησης
// {*************************************************************************}
/// <summary>
/// Συνάρτηση FormatMacAddress
/// </summary>
function FormatMacAddress(const Value: array of Byte): string;
begin
Result := Format('%2.2x-%2.2x-%2.2x-%2.2x-%2.2x-%2.2x', [Value[0], Value[1],
Value[2], Value[3],
Value[4], Value[5]]);
end; // Τέλος της Συνάρτησης
// {*************************************************************************}
/// <summary>
/// Συνάρτηση FormatDecimal
/// </summary>
function FormatDecimal(Value: Int64): string;
var
i, j: Integer;
begin
Result := IntToStr(Value);
j := 0;
for i := Length(Result) downto 1 do
begin
Inc(j);
if (j = 3) and (i <> 1) then
begin
Insert(ThousandSeparator, Result, i);
j := 0;
end;
end;
end; // Τέλος της Συνάρτησης
// {*************************************************************************}
/// <summary>
/// Συνάρτηση GetActionIndexByTag
/// </summary>
function TMainForm.GetActionIndexByTag(ATag: Integer): Integer;
var
i: Integer;
begin
Result := -1;
with ActionList do
for i := 0 to ActionCount - 1 do
if ((Actions
as TAction).GroupIndex = 1) and (Actions.Tag = ATag) then
Result := Actions.Index;
end; // Τέλος της Συνάρτησης
// {*************************************************************************}
/// <summary>
/// Διαδικασία Δημιουργίας της Κυρίως Φόρμας
/// </summary>
procedure TMainForm.FormCreate(Sender: TObject);
var
WSAData: TWSAData
Position: TRect
begin
InitLogs('WNetStat')
// Αρχικοποιεί τα Logs της Εφαρμογής
if WSAStartup($0101, WSAData) <> 0 then
with Application do
begin
MessageBox(PChar(SWinSockErr), PChar(Title), MB_OK or MB_ICONERROR);
ShowMainForm := False;
Terminate;
end;
with TRegistry.Create do
try
if OpenKey(INIT_KEY, False) then
try
if ValueExists(SPosition) then
begin
ReadBinaryData(SPosition, Position, SizeOf(Position));
BoundsRect := Position;
end;
if ValueExists(SWindowState) then
if ReadInteger(SWindowState) = Ord(wsMaximized) then
WindowState := wsMaximized;
if ValueExists(SShowToolBar) then
ToolBar.Visible := ReadBool(SShowToolBar);
if ValueExists(SShowStatusBar) then
StatusBar.Visible := ReadBool(SShowStatusBar);
if ValueExists(SShowTrayIcon) then
if ReadBool(SShowTrayIcon) then
actTrayIcon.Execute;
if ValueExists(SShowByName) then
actByName.Checked := ReadBool(SShowByName);
if ValueExists(SShowAllEndpoints) then
actAllEndpoints.Checked := ReadBool(SShowAllEndpoints);
if ValueExists(SShowTextLabels) then
if ReadBool(SShowTextLabels) then
actLabels.Execute;
if ValueExists(SShowLargeIcons) then
if ReadBool(SShowLargeIcons) then
actIcons.Execute;
if ValueExists(SAutoRefresh) then
actAutoRefresh.Checked := ReadBool(SAutoRefresh);
if ValueExists(SAppendStatistics) then
FAppendStatistics := ReadBool(SAppendStatistics);
if ValueExists(SAutoSave) then
FAutoSave := ReadBool(SAutoSave);
if ValueExists(SAction) then
FAction := ReadInteger(SAction);
if ValueExists(SInterval) then
Timer.Interval := ReadInteger(SInterval);
if ValueExists(SLastFile) then
begin
FFileName := ReadString(SLastFile);
if FFileName <> '' then
Caption := Format('%s - %s', [Application.Title, FFileName]);
end;
finally
CloseKey;
end;
finally
Free;
end;
gethostname(FHostName, SizeOf(FHostName));
FDone := True;
end; // Τέλος της Διαδικασίας
// {*************************************************************************}
/// <summary>
/// Διαδικασία FormShow
/// </summary>
procedure TMainForm.FormShow(Sender: TObject);
begin
actRefresh.Execute;
end; // Τέλος της Διαδικασίας
// {*************************************************************************}
/// <summary>
/// Διαδικασία FormClose
/// </summary>
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if actTrayIcon.Checked then
begin
Hide;
Action := caNone;
end;
end; // Τέλος της Διαδικασίας
// {*************************************************************************}
/// <summary>
/// Διαδικασία FormDestroy
/// </summary>
procedure TMainForm.FormDestroy(Sender: TObject);
var
Position: TRect;
begin
with TRegistry.Create do
try
if OpenKey(INIT_KEY, True) then
try
if WindowState = wsNormal then
begin
Position := BoundsRect;
WriteBinaryData(SPosition, Position, SizeOf(Position));
end;
WriteInteger(SWindowState, Ord(WindowState));
WriteBool(SShowToolBar, ToolBar.Visible);
WriteBool(SShowStatusBar, StatusBar.Visible);
WriteBool(SShowTrayIcon, actTrayIcon.Checked);
WriteBool(SShowByName, actByName.Checked);
WriteBool(SShowAllEndpoints, actAllEndpoints.Checked);
WriteBool(SShowTextLabels, actLabels.Checked);
WriteBool(SShowLargeIcons, actIcons.Checked);
WriteBool(SAutoRefresh, actAutoRefresh.Checked);
WriteBool(SAppendStatistics, FAppendStatistics);
WriteBool(SAutoSave, FAutoSave);
WriteInteger(SAction, FAction);
WriteInteger(SInterval, Timer.Interval);
WriteString(SLastFile, FFileName);
finally
CloseKey;
end;
finally
Free;
end;
WSACleanup;
end; // Τέλος της Διαδικασίας
// {*************************************************************************}
/// <summary>
/// Διαδικασία ListViewColumnClick
/// </summary>
procedure TMainForm.ListViewColumnClick(Sender: TObject;
Column: TListColumn);
begin
FAscending := not FAscending;
if (FSortCol <> -1) and (FSortCol <> Column.Index) then
begin
FAscending := True;
ListView.Columns[FSortCol].ImageIndex := -1;
end;
if FAscending then
Column.ImageIndex := 2
else
Column.ImageIndex := 3;
FSortCol := Column.Index;
ListView.CustomSort(nil, FSortCol - 1);
end; // Τέλος της Διαδικασίας
// {*************************************************************************}
/// <summary>
/// Διαδικασία ListViewCompare
/// </summary>
procedure TMainForm.ListViewCompare(Sender: TObject; Item1,
Item2: TListItem; Data: Integer; var Compare: Integer);
// {*************************************************************************}
/// <summary>
/// Συνάρτηση AlignIpAddress
/// </summary>
function AlignIpAddress(const IpAddress: string): string;
var
P, Start: PChar;
S: string;
begin
Result := '';
P := PChar(IpAddress);
while P^ <> #0 do
begin
Start := P;
while not (P^ in [#0, '.']) do Inc(P);
SetString(S, Start, P - Start);
Result := Result + Format('%3s', );
if P^ <> #0 then
begin
Result := Result + '.';
Inc(P);
end;
end;
end; // Τέλος της Συνάρτησης
// {*************************************************************************}
/// <summary>
/// Συνάρτηση AlignAddress
/// </summary>
function AlignAddress(const Address: string): string;
var
IpAddr, Port: string;
begin
IpAddr := AlignIpAddress(Copy(Address, 1, Pos(':', Address) - 1));
Port := Copy(Address, Pos(':', Address) + 1, Length(Address));
Result := Format('%s:%5s', [IpAddr, Port]);
end; // Τέλος της Συνάρτησης
// {*************************************************************************}
/// <summary>
/// Συνάρτηση AlignDecimal
/// </summary>
function AlignDecimal(const Value: string): string;
begin
Result := Format('%25s', [Value]);
end; // Τέλος της Συνάρτησης
// {*************************************************************************}
var
SortFlag: Integer;
begin
if FAscending then SortFlag := 1 else SortFlag := -1;
if Data = -1 then
if FAction in [1, 2, 3] then
Compare := SortFlag * AnsiCompareText(AlignIpAddress(Item1.Caption),
AlignIpAddress(Item2.Caption))
else