2023年10月31日 星期二

Delphi Class Visibility Access Specifier Class Member Visibility Strict Protected | Strict Private| Protected Visibility default protected strict private public private published strict protected

 Delphi
Class Visibility
Access Specifier
Class Member Visibility
 Strict Protected | Strict Private| Protected

Visibility
 default protected
 strict private public
 private published
 strict protected

 default protected
 public
 private published
 https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Private,_Protected,_Public,_and_Published_Declarations

 strict private  
 strict protected
 automated



 private protected public published automated
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Classes_and_Objects_(Delphi)
https://github.com/Embarcadero/OTAPI-Docs/blob/main/The%20Delphi%20IDE%20Open%20Tools%20API%20-%20Version%201.2.md
https://www.mmx-delphi.de/articles/creational-wizard/
 
https://www.drbob42.com/delphi/property.htm
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Classes_and_Objects_(Delphi)
 https://stackoverflow.com/questions/8232990/best-approach-to-elevate-method-visibility-in-a-descendant-class
 https://docwiki.embarcadero.com/radstudio/alexandria/en/classes_and_objects_(delphi)
 https://stackoverflow.com/questions/3117875/delphi-7-personal-class-wizard-extension/3122050#3122050
delphi class create wizard creational wizard
 https://docwiki.embarcadero.com/radstudio/alexandria/en/using_class_completion


https://blogs.embarcadero.com/design-patterns-in-rad-delphi/
https://sourcemaking.com/design_patterns/observer/delphi
https://en.m.wikipedia.org/wiki/Software_design_pattern
delphi design patterns  protected  public  private published

https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Programs_and_Units_(Delphi)
 Interface 
 Implementation 
 Initialization 
 Finalization Section

 https://www.cnblogs.com/findumars/p/8096907.html
Delphi Code Coverage
 https://thundaxsoftware.blogspot.com/2013/02/using-delphi-code-coverage.html?m=0

https://github.com/factorysolution/design-patterns-delphi
https://github.com/topics/state-pattern?l=c%2B%2B
https://github.com/topics/creational-patterns
https://github.com/kamranahmedse/design-patterns-for-humans
https://github.com/RefactoringGuru/design-patterns-delphi/blob/main/README.md
https://github.com/PacktPublishing/Hands-On-Design-Patterns-with-Delphi
https://github.com/RefactoringGuru/design-patterns-delphi
https://github.com/FactorySolution/Design-Patterns-Delphi

https://github.com/exilon/awesome-delphi

https://github.com/beNative/Concepts
Concepts is a modular Delphi application which illustrates some language features, design patterns and some interesting frameworks and components which include:
    Delphi Run-Time Library (or RTL)
    FireMonkey (FMX)
    Visual Component Library (VCL)
    Spring4D    DSharp    DDuce    Virtual treeview
    TChromeTabs component    SQLBuilder4Delphi
    ZeroMQ / ZeroMQ (ØMQ)    MQTT   DDetours   TzObjectInspector
    TBCEditor    SynEdit   JsonDataObjects   Ararat Synapse
    The Indy project    TFireMonkeyContainer
    BTMemoryModule    Chinook database    SQLite    KControls

These libraries are also used in some of my open source projects:
    Notepas    SnippetSource
    DataGrabber    LogViewer
    DDuce

https://blogs.embarcadero.com/massive-collection-of-design-patterns-frameworks-components-and-language-features-for-delphi/

https://www.researchgate.net/publication/269303611_A_Journey_through_the_Land_of_Model-View-Design_Patterns
(PDF) A Journey through the Land of Model-View-Design Patterns
Massive Collection Of Design Patterns, Frameworks, Components, And Language Features For Delphi

Common Object Request Broker Architecture CORBA

 https://en.wikipedia.org/wiki/Common_Object_Request_Broker_Architecture

 https://www.corba.org/

https://docs.oracle.com/cd/E15261_01/tuxedo/docs11gr1/tech_articles/CORBAobjects.html 

https://www.ibm.com/docs/zh-tw/app-connect/12.0?topic=corba-common-object-request-broker-architecture

https://www.geeksforgeeks.org/client-server-software-development-introduction-to-common-object-request-broker-architecture-corba/

http://www.sce.carleton.ca/netmanage/corba/arch2.htm

https://docs.oracle.com/cd/E19900-01/820-0848/abltw/index.html

Orbacus  WebSphere Netscape Communicator Sun Java 2 Platform Provides ORB CORBA programming models RMI programming model 
ORBs implementations Client- and Implementation-resident ORB Server-based ORB System-based ORB Library-based ORB



Message bzw. Integration Broker
Anbieter
BEA
Candle
CSK Software
eXcelon
GE Global eXchange Services
IBM
Iona
iPlanet (Sun•Netscape Alliance)
Jacada (früher Propelis)
Leve18
Mercator (früher TSI)
Netik
Quovadv (friiher
Healthcare.com)
SecBeyond
Software AG
Prodo k/
eLink Information Integrator
CandleNet eBusiness Platform
X-Gen
B2B Integration Server
Enterprise System
WebSphere NIQ Integrator
iPortal Integration Server
iPlanet Integration Server
Jacada Integrator
Geneva Enterprise Integrator
Integration Broker
Interchange
QDX Engine
e*Gate Integrator
EntireX Orchestrator
'Veitere Informationen
http://www.bea.com
http://www.candle.com
http://www.csksonware.com
http://www.exceloncorp.com
http://mvw.gegxs.com
http://wmv-3.ibm.com/sonuare/
ts/mqseries
http://www.iona.com/products/
ip_ipi_home.htm
http://www.iplanet.com
http://mvw.jacada.com
http://www.leve18.comjgei/
http://www.mcrcator.com
http://www.netik.com
http:/!www.quovadx.com
http://www.seebeyond.com
http://www.sonwareag.com

Tabelle A-1: Message bzw. Integration Broker
Anbieter Produkt Weitere Informationen
BEA eLink Information Integrator http://www.bea.com
Candle CandleNet eBusiness Platform http://www.candle.com
CSK Software X-Gen http://www.csksoftware.com
eXcelon B2B Integration Server http://www.exceloncorp.com
GE Global eXchange Services Enterprise System http://www.gegxs.com
IBM WebSphere MQ Integrator http://www-3.ibm.comy software/
ts/mqseries
lona iPortal Integration Server http://www.iona.com/products/
ip_ipi_home.htm
iPlanet (Sun/Netscape Alliance) 1Planet Integration Server http://www. iplanet.com
Jacada (friiher Propelis) Jacada Integrator http://www.jacada.com
Level& Geneva Enterprise Integrator http://www. level8.com/gei/
Mercator (friiher TSI) Integration Broker http://www.mercator.com
Netik Interchange http://www.netik.com
Quovadkx (friiher
Healthcare.com)
QDX Engine http://www.quovadx.com
SeeBeyond e*Gate Integrator http://www.seebeyond.com
Software AG EntireX Orchestra t or http://www.softwareag.com
Sterling Integrator http://www.sterlingcommerce.
Sterling Commerce
com
SunGard Business Integration MINT Knowledge Family http://www.sungard.com
Sybase Enterprise Event Broker http://www.sybase.com
Systemfabrik GmbH
Information-Integration, http://www. systemfabrik.com
Warehouse Workbench
Tibco Tibco Integration Manager; http://www.tibco.com
Tibco Message Broker
Vitria Business W are http://www. vitria.com
Viewlocity AMTrix Integration Broker http://www. viewlocity.com
Vertex Interactive Evolve http://www. vertexinteractive.com
webMethods Enterprise Server http://www. webmethods.com
WRQ VeraStream Integration Broker | http://www.wrq.com

Tabelle A-2: Applikations-Server
Anbieter Produkt Weitere Informationen
Apple WebObjects http://www.apple.cony
webobjects/
ATG Dynamo http://www.atg.com
BEA Systems Weblogic http://www. beasys.com
Borland Enterprise Server http://www.borland.com
Fujitsu Interstage http://www. interstage.com
HP HP-AS http://www. bluestone.com
IBM WebSphere http://www.software.ibm.cony
webservers/appserv/
iPlanet (Sun/Netscape Alliance) | iPlanet http://www. iplanet.com
lona Orbix E2A http://www.iona.com
Oracle 9i Application Server http://www.oracle.com
Sybase EA Server http://www.sybase.com/products/
applicationservers/easerver
Lutris Lutris EAS http://www. lutris.com
Macromedia (friher Allaire) ColdFusion http://www.macromedia.com
Persistence PowerTier http://www.persistence.com

Tabelle A-3: Traditionelle Middleware-Produkte
Middleware Anbieter Produkt Weitere Informationen
7 NC Laboratories JaRPC http://www.ne-labs.com
a .
Netbula Power RPC http://www.netbula.com
Attunity ISG Navigator http://www. isgsoft.com
Cross Access Exadas http://www.crossaccess.com
Datenzugriffsorientierte
Data Mirror Transformation http://www.datamirror.com
Middleware \ (triiher Constellar) Server; Constellar Hub
Sybase EnterpriseConnect http://www.sybase.cony products/
Data Access middleware
IBM MOSeries (zukiinflig =| http://www-3.ibm.com/software/
WebSphere MQ) ts/mqseries/
Microsoft MS Message Queue http://www.microsoft.com/msmq/
(MSMQ)
Tibco Tibco Rendezvous http://www.tibco.com/products/rv
MOM iPlanet (Sun/Netscape | iPlanet Message http://www. iplanet.com/products/
Alliance) Queue for Java iplanet_message_queue/
(friher: Java Message
Queue JMS)
BEA Systems BEA MessageQ http://www.bea.com/products/
messageq/index.shtml
Candle Roma Technology http://www.candle.com
Queue JMS)
BEA Systems BEA MessageQ http://www.bea.com/products/
messageq/index.shtml
Candle Roma Technology http://www.candle.com
BEA Systems Tuxedo http://www. beasys.com/products/
tuxedo/index.shtml
Fujitsu-Siemens openUTM http://www. fujitsu-siemens.com/
servers/outm/outm_de.htm
TP-Monitore | 1BM CICS http://www-3.ibm.com/
software/ts
Microsoft Microsoft Transaction | http://www.microsoft.com/com/
Server (MTS)
Sybase Jaguar CTS http://www.sybase.com
ORBs
Eine umfassende Ubersicht zu Herstellern von CORBA-basierten Produkten findet
sich unter hitp:/\www.corba.org/vendors
BEA Systems ObjectBroker http://www. bea.com
Inprise Visibroker http://www. inprise.cony bes/
visibroker
lona Orbix, ORBacus http://www.iona.com
Microsoft Microsoft Transaction | http://www.microsoft.com/conY
Server (MTS)
Software AG EntireX Manager http://www. softwareag.com/ entirex/

Tabelle A-4: Prozessmanagement-Produkte
Einsatzbereich Anbieter Produkt Weitere Informationen
ATOSS Software Aencis http://www.atoss.com
IDS Scheer ARIS Toolset http://www.ids-scheer.com
Intraware Bonapart http://www.intraware.de
Knowledge Based ProSim http://www.kbsi.com
Systems (KBSI)
Proze magna solutions Silverrun-BPM http://www.silverrun.cony
— (Business Process bpm.himl
modellierung, Modeler)
-visualisierung
und Mega International Mega Suite hitp://www.mega.com
-simulati
Ne aeon Microsoft Visio http://www. microsoft. conv office,
visio
Powersim Powersim Studio http://www.powersim.com
Proforma Provision Workbench | http://www.proformacorp.com
Promatis AG Income http://www. promatis.com
RFF Electronics RFFlow http://www.tfh.com
Accelio Accelio Integrate http://www.accelio.com
(friher: Jetform)
Banctec Floware http://www.banctec.comw/f
COI GmbH COI-BusinessFlow http://www.coi.de
Dialogika multiDESK http://www.multidesk.com
IBM Lotus Workflow hitp://www.lotus.com
Workflow-
Management | 1BM MQSeries Workflow http://www-3.ibm.com/sofiware/
ts/mqseries/ workflow
Intraware IW-Workflow http://www. intraware.de
Ley COSA Workflow http://www.ley.de
Staffware Staffware Process http://www.staffware.com
Engine
Versata Versata Logic Suite http://www. versata.com



Tabelle A-5: Software-Tools
Anwendung Anbieter Produkt Weitere Informationen
Acta Technology ActaWorks http://www.acta.com
Data Junction Data Junction http://www.datajunction.com
Dresdner Kleinwort Openadaptor http://www.openadaptor.org
Punkt-zu- Wasserstein
Punkt- .
Integration | ETI (Evolutionary ETI Extract http://www.eti.com
Technologies Int.)
(ETL-Tools,
Adapter) Information Builders WebFOCUS ETL http://www. informationbuilders.
com
Taviz Technology elntegration Suite http://www. taviz.com
Thought Cocobase http://www.thoughtinc.com
ClientSoft CliemtBuilder http://www.clientsoft.com
Hob HobLink http://www.hob.de
Netmanage Rumba http://www.netmanage.com
Anbindung von | Open Connect WebConnect, http://www-.openconnect.com
Altsystemen AutoVista
(Legacyware) | Seagull WinJa, JWalk http://www.seagullsw.com/extend.
html
SofTouch CrossPlex http://www.softouch.com
Wraptor Laboratories | Apilink http://www.apilink.com
IBM Visual Age http://www-3.ibm.cony software!
ad/vaes
Merant PVCS http://www.merant.com
Microsoft Visual Studio.net http://www.msdn. microsoft.com’
Allgemeine vatudio
Entwicklungswerkzeuge
MID Innovator http://www.mid.de
Popkin Software SystemArchitect http://www.popkin.com
Rational Rational Suite http://www.rational.com
Visible Systems Visible Analyst http://www. visible.com
BMC Software Patrol Mainview http://www.bme.com
Computer Associates Unicenter http://www3.ca.com
System ; . ; ;
Manogement Hewlett-Packard OpenView http://www.openview. hp.com
MOQSoftware QPasa! http://www.mgsoftware.com
IBM (friiher: Tivoli) Tivoli http://www.tivoli.com

Literaturverzeichnis 229
Bereszewski u.a. 02 /Fusion, Konfusion, Kapitulation/
Bereszewski, Markus; Kloss, Kerstin; KeBler, Fred: Fusion, Konfusion,
Kapitulation, in: Informationweek, Nr. 2, 2002, 6. Jg., S. 20-24.
Bernotat u.a. 01 /EAL/
Bernotat, Jens; Hoch, Detlef J.; Laartz, Jiirgen; Scherdin, Alexander: EAIElementarer
Treiber der zukiinftigen Wettbewerbsposition, in: Information
Management & Consulting, Nr. 1, 2001, 16. Jg., S. 17-23.
Bernstein 96 /Middleware/
Bernstein, Philip A.: Middleware: A Model for Distributed System Services, in:
Communications of the ACM, Nr. 2, 1996, 39. Jg., S. 86-98.
Beuthner, Hase 00 /Elektronische Vorgangsbearbeitung/
Beuthner, Andreas; Hase, Michael: Elektronische Vorgangsbearbeitung ~ Das
Missing Link im E-Business, in: Informationweek, Nr. 15, 2000, 4. Jg., S. 32-34.
Biethahn u.a, 00 /Ganzheitliches Informationsmanagement/
Biethahn, Jérg; Mucksch, Harry; Ruf, Walter: Ganzheitliches Informationsmanagement,
Band |: Grundlagen, 5., unwesentlich veranderte Auflage,
Minchen, Wien 2000.
Biskamp 99 /Legacy-Anwendungen/
Biskamp, Stefan: Legacy Anwendungen - Kosmetik fiir dltere Sofiware-
Semester, in: Informationweek, Nr. 16, 1999, 3. Jg., S. 35.
Bisson 00 /Soap/
Bisson, Simon: Soap without froth, in: Application Development Advisor, Nr. 5,
2000, Bd. 3, S. 50-53.
Bonnet 01 /B2B/EAL im PAYBACK Umfeld (WWW)
Bonnet, Thomas: B2B/EAI im PAYBACK Umfteld, Vortrag auf dem EAIForum,
Mainz, 8. Mai 2001.
http://www.competence-site.de/eaisysteme.nst./StudViieewn, Abruf am
22.7.2001.

Bisson 00 /Soap/
Bisson, Simon: Soap without froth, in: Application Development Advisor, Nr. 5,
2000, Bd. 3, S. 50-53.
Bonnet 01 /B2B/EAL im PAYBACK Umfteld (WWW)
Bonnet, Thomas: B2B/EAI im PAYBACK Umfteld, Vortrag auf dem EAIForum,
Mainz, 8. Mai 2001.
http://www.competence-site.de/eaisysteme.nsf./StuVdiieewn, Abruf am
22.7.2001.
Bosilj-Vuksic, Hlupic 01 /Petri nets and IDEF diagrams/
Bosilj-Vuksic, Vesna; Hlupic, Vlatka: Petri nets and IDEF diagrams:
Applicability and efficacy for business process modelling, in: Informatica,
Vol. 25, Teil 1, 2001, S. 123-134.
Bradbury 00 /Middleware with bells/
Bradbury, Danny: Middleware with bells on, in: Application Development
Advisor, Nr. 5, 2000, Bd. 3, S. 26-29.

242 Literaturverzeichnis
Mertens 97 /Integrierte Informationsverarbeitung/
Mertens, Peter: Integrierte Informationsverarbeitung, in: Mertens, Peter u.a.
(Hrsg.): Lexikon der Wirtschaftsinformatik, 3., vollstandig neu bearbeitete und
erweiterte Auflage, Berlin u.a. 1997, S. 208-209.
Mertens 66 /Integration/
Mertens, Peter: Die zwischenbetriebliche Kooperation und Integration bei der
automatisierten Datenverarbeitung, Meisenheim am Glan, 1966.
Mertens, Griese 00 /Integrierte Informationsverarbeitung 2/
Mertens, Peter; Griese, Joachim: Integrierte Informationsverarbeitung 2 —
Planungs- und Kontrollsysteme in der Industrie, 8., vollstaindig tiberarbeitete
Auflage, Wiesbaden 2000.
Mertens u.a. 99 /Wirtschaftsinformatik/
Mertens, Peter; Chamoni, Peter; Ehrenberg, Dieter; Griese, Joachim; Heinrich,
Lutz J.; Kurbel, Karl (Hrsg.): Studienftihrer Wirtschaftsinformatik, 2., aktualisierte
und erweiterte Auflage, Braunschweig, Wiesbaden 1999,
Mertens, Holzner 92 (ntegrationsansatze/
Mertens, Peter: Holzner, Jochen: Eine Gegeniiberstellung von
Integrationsansatzen der Wirtschaftsinformatik, in: Wirtschaftsinformatik, Nr. 1,
1992, 34. Jg.. S. 5-25.

Mever-Martin 01 /Standardadapter/
Meyer-Martin, Ulrich: Vorsicht bei Standardadaptern!, in: Computerwoche
extra, Nr. 2,23. Marz 2001, S. 15.
Miedl 01 /Web-Services/
Miedl, Wolfgang: Das Ende der Plattformkriege, Web-Services versprechen
Mobilitaét und Systemunabhangigkeit, in: Computerwoche, Nr. 35, 2001, Bd. 28,
S. 18-19.
Mondal, Gupta 00 ‘Choosing a Middleware/
Mondal, Sakib Abdul; Gupta, Kingshuk Das: Choosing a Middleware for Web-
Integration of a Legacy Application, in: Software Engineering Notes, Nr. 3,
2000, Bd. 25, S. 50-53.
Morgenthal, La Forge 00 /EAI with XML and Java/
Morgenthal, J.P.: La Forge, Bill: Enterprise Application Integration with XML
and Java, London u.a. 2000.
Morin 98 ‘CORBA/
Morin, Ted: Migrating Legacy Systems to CORBA, in: Object Magazine, Nr. 1,
1998, Bd. 8, 8. 39-43.


signal edge 上緣觸發指令PLS(Pulse) Rising Edge rising edge (or positive edge) rising edge-triggered electronics

 signal edge
上緣觸發指令PLS(Pulse)
Rising Edge
rising edge (or positive edge)
rising edge-triggered

負緣 falling edge
 falling edge (or negative edge)

In the case of a pulse, which consists of two edges:

    The leading edge (or front edge) is the first edge of the pulse.
    The trailing edge (or back edge) is the second edge of the pulse.
使用Verilog自定義原語(user defined primitives)時,正緣、負緣分別以(01)、(10)表示,也可以用縮寫字母r、f表示。

三菱PLC PLS和PLF指令的使用简介
階梯圖Ladder Diagram (LD)
PLS(Pulse):上升沿微分输出指令。 PLF:下降沿微分输出指令

Flip-flop)致能(enable)或允動(gate)預置(preset)與清除(clear)邊緣觸發(edge-triggered)
正緣觸發(positive edge-triggered)
 負緣觸發(negative edge-triggered)三態邏輯

三態邏輯 tri-state logic 或Three-state logic)有CS(晶片選擇,chip select)和OE(輸出使能,output enable)
上拉電阻(英語:Pull-up resistors)下拉電阻(Pull-down resistor)
0     1     Z (high impedance

 Kleene and Priest logics   
 F  U  T


    Buffer amplifier
    Logic level
    Metastability
    Three-valued logic
    Four-valued logic
    Nine-valued logic
    Don't care
    Single pole, centre off (SPCO)

Multiplexer

verilog  Symbol    Comments
0    Logic 0
1    Logic 1
x    Unknown, can be either logic 0 or 1. Can be used as input/output or current state of sequential UDPs
?    Logic 0, 1 or x. Cannot be output of any UDP
-    No change, only allowed in output of a UDP
ab    Change in value from a to b where a or b is either 0, 1, or x
*    Same as ??, indicates any change in input value
r    Same as 01 -> rising edge on input
f    Same as 10 -> falling edge on input
p    Potential positive edge on input; either 0->1, 0->x, or x->1
n    Potential falling edge on input; either 1->0, x->0, 1->x

 true false R  rising edge F falling edge 

 

Verilog  user defined primitives r f

https://www.javatpoint.com/verilog-user-defined-primitives

leading edge trailing edge positive edge-triggered negative edge-triggered Flip-Flop Circuit

https://zh.wikipedia.org/wiki/Verilog

2023年10月30日 星期一

Custom FireMonkey "TSimpleTriangle" component TCanvas = class(TInterfacedPersistent, IFreeNotification) TSimpleTriangle = class(TShape)

 https://community.embarcadero.com/index.php/blogs/entry/custom-firemonkey-tsimpletriangle-component-39692
    procedure DrawLine(const APt1, APt2: TPointF; const AOpacity: Single); virtual; abstract;
    procedure FillRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners;
      const AOpacity: Single; const ACornerType: TCornerType = TCornerType.ctRound); virtual; abstract;
    procedure DrawRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners;
      const AOpacity: Single; const ACornerType: TCornerType = TCornerType.ctRound); virtual; abstract;
    procedure FillEllipse(const ARect: TRectF; const AOpacity: Single); virtual; abstract;
    procedure DrawEllipse(const ARect: TRectF; const AOpacity: Single); virtual; abstract;
    procedure FillArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single; const AOpacity: Single);
    procedure DrawArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single; const AOpacity: Single);
    function PtInPath(const APoint: TPointF; const APath: TPathData): Boolean; virtual; abstract;
    procedure FillPath(const APath: TPathData; const AOpacity: Single); virtual; abstract;
    procedure DrawPath(const APath: TPathData; const AOpacity: Single); virtual; abstract;
    procedure DrawBitmap(const ABitmap: TBitmap; const SrcRect, DstRect: TRectF; const AOpacity: Single;
      const HighSpeed: Boolean = False); virtual; abstract;
    procedure DrawThumbnail(const ABitmap: TBitmap; const Width, Height: Single); virtual; abstract;
    { routines }
    procedure DrawRectSides(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners;
      const AOpacity: Single; const ASides: TSides; const ACornerType: TCornerType = TCornerType.ctRound);
    { linear polygon }
    procedure FillPolygon(const Points: TPolygon; const AOpacity: Single); virtual;
    procedure DrawPolygon(const Points: TPolygon; const AOpacity: Single); virtual;


    http://docwiki.embarcadero.com/RADStudio/en/FireMonkey_Components_Guide
    http://docwiki.embarcadero.com/RADStudio/en/Creating_a_FireMonkey_Component
    http://docwiki.embarcadero.com/RADStudio/en/Creating_a_FireMonkey_Component_(C%2B%2B)
Tags: component development Delphi Delphi Delphi Programming Delphi Programming Delphi XE2 FireMonkey graphics HD News Open Tools API RAD RAD Studio XE2 shapes source-code source-code triangle XE2


https://jonlennartaasenden.wordpress.com/category/firemonkey/
firemonkey | Jon L. Aasenden
HTMLComponents for Delphi, a closer look

FMX Types Global Use GPU Canvas OpenGL Delphi Web Script

 https://www.delphitools.info/2013/12/24/a-terapixel-image-for-the-delphiwebscript-christmas/

A Terapixel Image for the DelphiWebScript Christmas! - DelphiTools

https://learn.microsoft.com/zh-tw/windows/win32/direct3darticles/directx-warp?redirectedfrom=MSDN#architecture

https://learn.microsoft.com/zh-tw/windows/win32/direct3darticles/directx-warp?redirectedfrom=MSDN#capabilities

https://learn.microsoft.com/zh-tw/windows/win32/direct3darticles/directx-warp?redirectedfrom=MSDN#enabling_rendering_when_direct3d_10_hardware_is_not_available 

https://parnassus.co/a-firemonkey-client-for-the-dws-terapixel-mandelbrot-data-set/

A FireMonkey client for the DWS Terapixel Mandelbrot data set - Parnassus OÜ - Delphi and C++Builder Plugins

https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Overriding_OpenGL_Rendering_Parameters

https://stackoverflow.com/questions/26599780/fmx-shape-components-does-not-correctly-displayed-on-the-android-platform

initialization  FMX.Types.GlobalUseGPUCanvas := True; FMX.Types.GlobalUseDX10

https://blog.grijjy.com/2020/05/25/boost-mac-performance-with-metal-and-delphi-10-4/

Boost Mac performance with Metal and Delphi 10.4 – grijjy blog


FMX Types GlobalUseGPUCanvas   FMX.Types GlobalDisableFocusEffect
GlobalUseGPUCanvas
GlobalUseDX
GlobalUseDXSoftware
GlobalUseDXInDX9Mode
GlobalUseDirect2D
GlobalUseGDIPlusClearType
GlobalUseHWEffects GlobalUseDX10 GlobalUseDX10Software

 

fmx.types.GlobalUseHWEffects = true
FMX.Types.GlobalDisableFocusEffect = false
 FMX.Types.GlobalUseDirect2D = true
FMX.Types.GlobalUseDXSoftware = false
fmx.Types.GlobalUseDX = true
FMX.Types.GlobalUseDXInDX9Mode = false
FMX.Types.GlobalUseGDIPlusClearType = true
 FMX.Types.GlobalUseGPUCanvas= false 

GlobalUseHWEffects GlobalDisableFocusEffect GlobalUseDirect2D GlobalUseDXSoftware  GlobalUseDX GlobalUseDXInDX9Mode GlobalUseGPUCanvas  GlobalUseGDIPlusClearType

https://blog.therealoracleatdelphi.com/2015/12/baking-object-pascal-and-rapsberry-pie.html?spref=tw

https://stackoverflow.com/questions/34139169/runtime-allocation-of-ontap-event-delphi-seattle

Logstash | Modern Big Data Processing with Hadoop

 Hadoop HDFS Hive HBASE Spark  Flume Storm Flume Kafka Logstash

apache flume kafka spark hadoop mapreduce hadoop hdfs hive

 Hadoop Ecosystem | Hadoop Tools for Crunching Big Data | Edureka

https://www.edureka.co/blog/hadoop-ecosystem

reusable server kernel application programmers multithreaded server

 https://www.ibm.com/docs/en/zvm/7.2?topic=cms-reusable-server-kernel

https://www.vm.ibm.com/rsk/

https://docs.oracle.com/cd/E12531_01/tuxedo100/cservers/mtserv.html

Developing Multithreaded
Applications: A Platform
Consistent Approach

作業系統 CH4 Multithreaded Programming - HackMD

C++ Network Programming Volume 2: Systematic Reuse ...Semantic Scholarhttps://www.semanticscholar.org › paperThe ADAPTIVE Communication Environment (ACE) is an open-source toolkit for building high-performance networked applications and next-generation middleware ... 

https://www.researchgate.net/figure/CORBA-30-Support-for-Real-Time-Applications_fig2_232647305

reusable server kernel application programmers  multithreaded server Multithreaded CORBA Server Applications  CORBA 3.0 Support for Real-Time Applications | Download Scientific Diagram

https://theaceorb.com/about/abouttao/
The 2.2a version of the ACE ORB (TAO), pronounced "dow", is a CORBA V3.0 compliant, C++, object request broker. It is a second generation ORB developed with a highly extensible architecture as a result of its use of what might be termed a pattern framework, more commonly known as the ACE library. (ACE is an acronym for ADAPTIVE Communication Environment, ADAPTIVE is another acronym and stands for A Dynamically Assembled Protocol, Transformation And Validation Environment!).

https://docs.oracle.com/cd/A97335_02/apps.102/a81358/01_intro.htm
The JServer Java virtual machine (JVM) is a complete, Java 2-compliant Java execution environment. It runs in the same process space and address space as the RDBMS kernel, sharing its memory heaps and directly accessing its relational data. This design optimizes memory use and increases throughput.The JServer JVM provides a run-time environment for Java objects. It fully supports Java data structures, method dispatch, exception handling, and language-level threads. It also supports all the core Java class libraries including java.lang, java.io, java.net, java.math, and java.util. Figure 1-3 shows its main components.



im chat Instant Messenger system SERVER

 https://github.com/openimsdk/open-im-server

https://docs.oracle.com/communications/E76289_01/doc.1001/e76290/ins_sysreqs.htm#IMSIN173

https://www.sciencedirect.com/topics/computer-science/instant-messaging-server

https://xmpp.org/uses/instant-messaging/ 

https://www.troopmessenger.com/blogs/top-self-hosted-chat-software

https://veriato.com/


https://www.quora.com/Instant-Messaging-IM-How-does-a-web-based-browser-based-chat-application-work
https://socket.io/#browser-support
A popular toolkit is Socket.io. From their page: the cross-browser WebSocket for realtime apps.- the following methods are available:    WebSockets    Adobe Flash Socket    AJAX Long Polling    AJAX Multipart Streaming    Forever IFrame    JSONP Polling

Instant Messaging Software Architecture (Sun Java Communications Suite 5 Deployment Planning Guide)

2023年10月29日 星期日

Delphi國內優秀網站及開源項目

Delphi盒子 www.2ccc.com

2Pascal-新時代的Pascal http://www.2pascal.com

WeDelphi http://www.WeDelphi.com

新大富翁論壇 http://www.dfwlt.com/forum.php

萬一的博客:http://www.cnblogs.com/del/

原Delphi窖洞洞主博客:http://www.cnblogs.com/xalion

國內開源項目:
CnPack:http://www.cnpack.org/
 https://github.com/cnpack/cnvcl
QDAC(QQ官方羣 250530692):http://blog.qdac.cc/
OrangeUI-Delphi移動開發利器(OrangeUI技術支持QQ羣:10900297)
RPMP-Restful Plugin Midware for Pascal(QQ 羣: 289501953): https://github.com/ZYHPRO/RPMP
MyBean輕量級配置框架,插件交流羣: 205486036: https://github.com/ymofen/delphi-framework-MyBean
ABFrameWork(Delphi 框架) QQ交流羣: 307455944 (非開源)
開源網絡庫之Delphi Cross Socket,由WiNDDRiVER(soulawing@gmail.com)開發的跨平臺網絡庫,代碼風格優美,註釋詳細,唯一不足的是Demo略少,在Github上開源:https://github.com/winddriver/Delphi-Cross-SocketQQ交流羣:152678031
開源網絡庫之DIOCP,由天地弦(www.diocp.org)開發的網絡併發框架,多線程管理庫diocp,經過長時間的測試,運行極爲穩定,在Github上開源:https://github.com/ymofen/diocp-v5QQ交流羣:638127021


Delphi國內優秀網站及開源項目
 https://www.twblogs.net/a/5efd6c459644181341a12ed5
https://www.cnblogs.com/tc310/category/593538.html
http://m.mamicode.com/info-detail-2941887.html

tux web server nginx lighttpd openresty epoll kqueue

 list web http server
On this page
https://www.linode.com/docs/guides/web-servers-list/
    The Web Servers List. Apache HTTP Server. Apache Tomcat. Caddy Web Server. Eclipse Jetty Webserver. H2O Web Server.
    Hiawatha Web Server.
    Internet Information Services.
    Lighttpd Web Server.
    NGINX Web Server. Node.js. OpenLiteSpeed Web Server.
    Hosting in the Cloud.


https://en.wikipedia.org/wiki/TUX_web_server
https://en.wikipedia.org/wiki/In-kernel_web_server
https://en.wikipedia.org/wiki/Service-oriented_architecture
https://en.wikipedia.org/wiki/Comparison_of_web_server_software
https://en.wikipedia.org/wiki/Web_server
https://en.wikipedia.org/wiki/Httpd
http://www.fenrus.demon.nl/
https://wiki.linuxquestions.org/wiki/List_of_web_servers
https://docstore.mik.ua/orelly/other/LRH/chp-12-sect-2.html
https://unixism.net/2019/04/linux-applications-performance-introduction/
https://docs.oracle.com/en/database/oracle/tuxedo/22/otxpo/oracle-tuxedo-web-accessible-services.html#GUID-C8FFCFBE-963D-4644-AD98-AF15B5643BE5

webserver RTU modbus SCADA OPC Server Communications 

webserver RTU  OPC Server  RTOS

https://realtimelogic.com/products/opc-ua/
RTOS Ready OPC-UA Client/Server


Modbus RTU/ASCII OPC Server
Automated Solutions
https://www.automatedsolutions.com › a...
Modbus OPC Server by Automated Solutions. Modbus RTU/ASCII OPC Server provides connectivity to Modbus PLCs, controllers, & instrumentation via serial port.

Embedded software solutions ST, 3rd parties and open ...STMicroelectronics
https://www.st.com › product_presentation › st...
server, Web server with SSI and CGI scripting, HTTP/2 client, MQTT and MQTT ... OPC UA Server   Embedded software solutions ST, 3rd parties and open source


HTTP Web Server Example FreeRTOS-Plus-TCP and ... FreeRTOS https://www.freertos.org › HTTP_web... This example uses FreeRTOS-Plus-TCP to implement a basic web (HTTP) server that accesses files from a file system implemented by FreeRTOS-Plus-FAT. Some demo ...


Embedded Web Server Demo Using the FreeRTOS ARM7 ... FreeRTOS https://www.freertos.org › portrowleyl... This demo application uses the FreeRTOS GCC ARM7 port along with the Rowley Associates CrossWorks integrated development tools to create a multitasking embedded ...


STM32-based FreeRTOS HTTP webserver example. GitHub https://github.com › MayaPosch › FreeR... Simple HTTP server based around FreeRTOS and the STM32 HAL libraries for Nucleo-F746ZG boards. Uses the LwIP Netconn API. It contains two HTML pages: The first ...

https://www.oschina.net/informat/%e6%89%80%e6%9c%89%e7%9a%84web%e6%9c%8d%e5%8a%a1%e5%99%a8


https://gist.github.com/willurd/5720255
list web http server web-servers md List of one-line web servers GitHub
linux freebsd driver network
iocp epoll rio ebpf kqueue
https://forums.freebsd.org/threads/running-freebsd-firewall-webserver-from-home-ip.64268/
https://docs.freebsd.org/en/books/handbook/config/
https://docs.freebsd.org/en/books/handbook/advanced-networking/
https://docs.freebsd.org/en/books/handbook/network-servers/


Contribution rate of each country gnu open source

 What countries have more open source developers

OpenSource contribution by country

Contribution rate of each country gnu open source

RPN Reverse Polish notation Polish notation Infix notation

 Reverse Polish notation

https://en.wikipedia.org/wiki/Reverse_Polish_notation

波蘭表示法 (Polish notation)
Polish notation
Infix notation

Stack
https://en.wikipedia.org/wiki/Calculator_input_methods
DAL  Direct Algebraic Logic
Advanced Scientific Calculator
RPN or DAL? A brief analysis of Reverse Polish Notation against Direct Algebraic Logic

Advanced Scientific Calculator algorithm
RPN DAL  Direct Algebraic Logic Reverse Polish notation Polish notation Infix notation
http://www.computersciencelab.com/RPNCalc.htm
Data Structure and Algorithms
Reverse Polish Notation (RPN) was devised as a method of simplifying mathematical expressions. RPN predates modern computers. It became useful with the ...

http://computer-programming-forum.com/29-pascal/e350d2466a1070f7.htm
Pascal, Algebraic -> Reverse Polish Notation
https://mathworld.wolfram.com/ReversePolishNotation.html

Reverse Polish notation Scientific Calculator source code
https://github.com/topics/rpn-calculator
https://github.com/RooiGevaar19/RPNCalculator

C++Builder AST TREE C++Builder toolsapi Abstract Syntax Tree

Using CDT APIs to programmatically introspect C/C++ code
https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.cdt.doc.isv%2Freference%2Fapi%2Findex.html
Eclipse CDT APIs to programmatically introspect C/C++ code
https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan
Eclipse CDT™ (C/C++ Development Tooling)

OpenTools API in RAD Studio - TCoffeeAndCode
LLVM Clang AST 
Abstract Syntax Tree Builder for Delphi. With DelphiAST  
PSIMiner processing PSI trees contain code syntax trees

https://github.com/RomanYankovsky/DelphiAST

https://stackoverflow.com/questions/31837122/library-for-c-abstract-syntax-trees-composition-and-code-generation
Library for C++ abstract syntax trees composition and code generation [closed]
https://docs.taichi-lang.org/blog/ast-refactoring
AST refactoring | Taichi Docs
https://stackoverflow.com/questions/17388771/get-human-readable-ast-from-c-code/17393852#17393852

https://learn.microsoft.com/zh-tw/dotnet/api/microsoft.jscript.ast?view=netframework-4.8.1
Learn .NET API  Microsoft.JScript AST Class

https://formulae.brew.sh/formula/
homebrew-core — Homebrew Formulae /api/formula.json (JSON API)

https://www.antlr.org/

https://eli.thegreenplace.net/2014/05/01/modern-source-to-source-transformation-with-clang-and-libtooling

2023年10月28日 星期六

personal organizer program Organizer automotive tracker calendar maker family friends data viewer budget journal personal planner todo list album

 personal organizer program Organizer

Personal  automobile tracker
Calendar Planner
maker family friends data viewer
financial accounting  budget
journal personal planner
Personal Diary
Daily to-Do Planner album
Notepad Journal
Personal  software
knowledge dictionary
To-do List Apps of 2023 for Personal Task Management
    Todoist.
    Microsoft To-Do.
    TeuxDeux.
    Any.do.
    ToodleDo.
    Habitica.
    TickTick.
    Google Keep.

Notepad Journal pocket diary spiral notebook

Asset Management System

Code Snippets CodeSnip: Pascal Source Code Snippets Repository ...
DelphiDabbler.com https://delphidabbler.com › software › c...A code snippets code bank for Windows, designed with Pascal code in mind. Users can add their own code & test compile in Delphi or Free Pascal. Open source.

Snipe-IT - Open Source Asset Management System
This is a FOSS project for asset management in IT Operations. Knowing who has which laptop, when it was purchased in order to depreciate it correctly, handling software licenses, etc.

https://snipe-it.readme.io/docs/external-libraries-scripts
Python Module by @jbloomer
SnipeSharp - .NET module in C# by @barrycarey
InQRy -unmaintained- by @Microsoft
SnipeitPS by @snazy2000 - Powershell API Wrapper for Snipe-it
jamf-snipe-rename - Python script to rename computers in Jamf from Snipe-IT
Marksman - A Windows agent for Snipe-IT
Snipe-IT plugin for Jira Service Desk
Python 3 CSV importer - allows importing assets into Snipe-IT based on Item Name rather than Asset Tag.
Snipe-IT Kubernetes Helm Chart - For more information, click here.
Snipe-IT Bulk Edit - Google Script files to use Google Sheets as a bulk checkout/checkin/edit tool for Snipe-it.
MosyleSnipeSync by @RodneyLeeBrands - Python script to synchronize information between Mosyle and Snipe-IT
WWW::SnipeIT by @SEDC - perl module for accessing the API

delphi DesignTime DesignIntf.pas DesignIntf DesignIntf DesignNotification IDesignNotification RegisterDesignNotification delphi DesignIntf IDesignNotification IDesigner delphi designintf componentdesigner designwindows

IDesignNotification  IDesignNotification  RegisterDesignNotification
delphi  DesignIntf IDesignNotification IDesigner
delphi designintf componentdesigner designwindows
tools delphi Language macros preprocessors  Code refactoring
Some IDE Editor Refactorings – MMX
https://www.mmx-delphi.de/screenshots/editor-refactorings/
RegisterDesignNotification
ItemInserted DesignIntf IDesignNotification SelectionChanged  IDesignNotification  RegisterDesignNotification SelectionChanged DesignerClosed ItemInserted

https://stackoverflow.com/questions/73414667/capture-selected-element-in-a-tform-in-design-time
http://mc-computing.com/languages/delphi/Property_Editors.html
Delphi - Property Editors
http://www.drbob42.com/delphi/property.htm
Dr.Bob's Delphi Clinic: Delphi Property and Component Editors for the Best Blog Hosting Sites

https://stackoverflow.com/questions/45719565/delphi-component-creation-design-time

https://wiert.me/2019/02/19/delphi-component-to-show-some-text-file-at-design-time/
Delphi component to show some text file at design time « The Wiert Corner – irregular stream of stuff
uDesignNote TDesignNote FContentForm FFileName GetContentForm HideFileContent SetFileName SetVisible ShowFileContent UpdateView Notification Operation TOperation

https://gist.github.com/UweRaabe/0cac18ac4d40f8c44d69e08306d3f726
Delphi component to show some text file at design time
 @UweRaabe UweRaabe/uDesignNote.pas

https://www.opendll.com/index.php?file-download=designide60.bpl&arch=32bit&version=6.0.10.160&dsc=Borland-IDE-Designer-Package

https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Design-time_Packages

http://www.delphigroups.info/2/19/518147.html
Design-time versus Run-time code - delphi

https://github.com/stden/trtm/blob/master/QuickRep/DesignIntf.pas
uses SysUtils, Classes, Types, TypInfo, IniFiles, DesignMenus, Controls;
  TPropKind = (pkProperties, pkEvents);
  IProperty = interface;
  TGetPropProc = procedure(const Prop: IProperty) of object;
  TPropertyAttribute = (paValueList, paSubProperties, paDialog, paMultiSelect,
    paAutoUpdate, paSortList, paReadOnly, paRevertable, paFullWidthName,
    paVolatileSubProperties, paVCL, paNotNestable);
  TPropertyAttributes = set of TPropertyAttribute;

https://docwiki.embarcadero.com/Libraries/Alexandria/en/Vcl.Controls.TControl.ControlStyle
Vcl.Controls.TControl.ControlStyle

https://github.com/delphi-blocks/WiRL/blob/master/Source/Core/WiRL.Core.Application.Editor.pas
wirl: Delphi RESTful Library

https://neftali.clubdelphi.com/category/programacion/page/2/
/*Prog*/ Delphi-Neftalí /*finProg*/Programación - /*Prog*/ Delphi-Neftalí /*finProg*/

https://github.com/bbrandt/bpl-map-XE7/blob/master/designide210.def
bpl-map-XE7/designide210.def

https://github.com/acras/components/blob/master/thirdparty/mxexports/mxExportReg.pas

http://www.verysource.com/code/33940412_1/dxLayoutDesignCommon.pas.html
dxLayoutDesignCommon.pas  DevEx_Delphi7_Library.rar

https://www.mmx-delphi.de/screenshots/editor-refactorings/
Some IDE Editor Refactorings – MMX ModelMaker Code Explorer adds Refactorings to the IDE code editor.

https://crystalnet-tech.com/RuntimeLibrary/Help/html/index.htm?page=Place_.Net_Controls_on_VCL_Form.htm
Creating a ClrContainer  We can create a ClrContainer Control using the Forms designer at design-time or using the TClrContainer class in code at run-time.  Design Time

https://www.atug.com/andypatterns/modelmak.htm
Modelmaker UML
Patterns, ModelMaker & Beyond

delphi designtime Architecture delphi design time packages dclcrdbx bpl

https://github.com/paolo-rossi/OpenAPI-Delphi
https://github.com/landgraf-dev/openapi-delphi-generator
https://github.com/paolo-rossi/delphi-neon
https://swagger.io/blog/api-design/openapi-driven-api-design/
OpenAPI-Delphi. OpenAPI 3.0 library
https://docwiki.embarcadero.com/RADStudio/Alexandria/en/VCL_Overview

https://github.com/TurboPack/SynEdit/blob/master/readme.md
Delphi Sources - Creating Compound Components - English Delphi Programming Guide
https://delphisources.ru/pages/faq/master-delphi-7/content/LiB0091.html
https://www.researchgate.net/figure/Component-Based-Architecture-In-the-figure-3-there-are-5-components-in-the-system-1_fig1_284358347
https://www.researchgate.net/figure/Meta-components-in-Delphi-at-design-time_fig4_243762954
4: Meta-components in Delphi at design time. | Download Scientific Diagram
https://www.researchgate.net/figure/Component-specification-architecture_fig2_222269453
https://www.amazon.co.uk/Delphi-Component-Design-Architecture-Development/dp/0201461366
http://www.felix-colibri.com/papers/web/intraweb_architecture/intraweb_architecture.html
http://www.felix-colibri.com/papers/web/intraweb_architecture/intraweb_architecture.html
https://etutorials.org/Programming/mastering+delphi+7/Part+III+Delphi+Database-Oriented+Architectures/Chapter+13+Delphi+s+Database+Architecture/MyBase+Stand-alone+ClientDataSet/



TTreeNode leak when VCL styles are active - Page 2 - VCL - Delphi-PRAXiS [en]

https://en.delphipraxis.net/topic/4520-ttreenode-leak-when-vcl-styles-are-active/
https://en.delphipraxis.net/topic/4520-ttreenode-leak-when-vcl-styles-are-active/?page=2

https://github.com/EtheaDev/SVGIconImageList/tree/master/Demo


   spdbtn_ShowMyFrameOnPanel2: TSpeedButton;
    pnlFormMainClientArea: TPanel;
    ComboBox1: TComboBox;
    procedure spdbtn_ShowMyFrameOnPanel2Click(Sender: TObject);
 myFrameWithTreeViews: TfrmeFrameWithTreeViews = nil;
  ComboBox1.Items.AddStrings(TStyleManager.StyleNames);
  ComboBox1.ItemIndex := ComboBox1.Items.IndexOf(TStyleManager.ActiveStyle.Name);
  TfrmeFrameWithTreeViews = class(TFrame)
    Splitter1: TSplitter;
    tvOnPanelLeft: TTreeView;
    pnlToPageControl: TPanel;
    Splitter2: TSplitter;
    pnlWithPageControlInto: TPanel;
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    tvOnTabSheet1: TTreeView;
    TabSheet2: TTabSheet;
    pnlWithMemoInto: TPanel;
    Memo1: TMemo;
    pnlToTreeViewOnLeftOnFrame: TPanel;
    Panel1: TPanel;
    spdbtnAddNewItemsOnLeft: TSpeedButton;
    Panel2: TPanel;
    spdbtnAddNewItemsOnRight: TSpeedButton;
    pgctrlOnFrame: TPageControl;
    TabSheet3: TTabSheet;
    tvOnpgctrlOnFrameOnTabSheet3: TTreeView;
    SpeedButton1: TSpeedButton;

Exploring Delphi XE3 – WinApi Additions – Winapi.Wbem WMI Tasks using Delphi – Registry JEDI API Library & Security Code Library

 
https://theroadtodelphi.com/tag/wmi/


https://learn.microsoft.com/zh-tw/windows/win32/wmisdk/wmi-start-page?redirectedfrom=MSDN
https://learn.microsoft.com/en-us/previous-versions/tn-archive/ee156554(v=technet.10)?redirectedfrom=MSDN
https://sourceforge.net/projects/jedi-apilib/
https://theroadtodelphi.com/2012/04/09/how-obtain-the-source-of-the-wmi-data/
https://learn.microsoft.com/zh-tw/windows/win32/cimwin32prov/win32-process?redirectedfrom=MSDN

Exploring Delphi XE3 – WinApi Additions – Winapi.Wbem

Delphi XE3 introduces a lot of new WinApi headers translations, between them is the Winapi.Wbem unit which is the Delphi (object pascal) translation for the wbemidl.h file which contains the WMI Component Object Model (COM) interface definitions. This means that from now you can access the WMI in a fastest way and directly using COM avoiding the use of the Microsoft WMIScripting Library and third party libraries.

 

 JEDI API Library & Security Code Library

 The JWA library aims to provide a conversion from C to Delphi of as many headers as possible from the PSDK etc. The JWSCL (security library) is an advanced object-oriented framework for programming with the Windows security features (ACL, Tokens, etc.)2013年9月25日

The JWA library aims to provide a conversion from C to Delphi of as many headers as possible from the PSDK etc. The JWSCL (security library) is an advanced object-oriented framework for programming with the Windows security features (ACL, Tokens, etc.)

Design and Tests of a High-Performance Long-Wave Infrared Refractive Thermal Imager: Freeform Lens in Coaxial System

 FL 100mm F1.0 LWIR Motorized Lens For Thermal Imaging Camera

Fl 100mm F1.0 Lwir Motorized Lens For Thermal Imaging Camera , Find Complete Details about Fl 100mm F1.0 Lwir Motorized Lens For Thermal Imaging Camera,Fl 100mm F1.0 Lwir Motorized Lens,Lwir Motorized ...

OEM Dahua Security IP Camera SD5A825-HNR-YA PTZ, 1/1.8",8MP@30FPS,25X(5.4~135mm),IR(492ft),True WDR,Starlight,VCA,PP,FD,Auto Tracking,Audio/Alarm,SD Slot,Brackt/Power Included, POE+

LWIR Zoom Lenses for Thermal Imaging Camera    Maximum 13X Zoom Ratio    Wide focal length range: wide angle focal lengths to a maximum telescope focal length: 400mm    Motorized focusing or manual focusing    DLC coating on front lenses 

https://www.unmannedsystemstechnology.com/feature/advanced-ir-zoom-lenses-for-next-generation-thermal-imaging/

2023年10月27日 星期五

delphi now today weekday isoday = (dayofweek + 5) mod 7 + 1

https://docwiki.embarcadero.com/CodeExamples/Sydney/en/DayOfWeek_(Delphi)
https://docwiki.embarcadero.com/Libraries/Sydney/en/System.SysUtils.DayOfWeek
http://www.delphibasics.co.uk/RTL.php?Name=DayOfTheWeek
https://en.wikipedia.org/wiki/Leap_year
https://en.wikipedia.org/wiki/Leap_week_calendar
https://github.com/akshayvadher/leap-years-tdd
https://github.com/stdlib-js/assert-is-leap-year
https://github.com/search?q=leap+language%3APascal+&type=repositories
https://github.com/search?q=leap+calendar+language%3APascal+&type=code
delphi today weekday leap calendar
https://www.delphibasics.co.uk/Method.php?NameSpace=System.Globalization&Class=Calendar&Type=Class&Method=GetDayOfWeek
today weekday leap calendar GetDayOfWeek libraries easiest method  calculating
Algorithms for Calculating Day of Week
https://calendars.fandom.com/wiki/Calculating_the_day_of_the_week
https://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week
https://learn.microsoft.com/zh-tw/dotnet/api/system.globalization.calendarweekrule?view=net-7.0
https://stackoverflow.com/questions/71269276/same-dayofweek-for-a-given-year-in-delphi
 isoday = (dayofweek + 5) mod 7 + 1

delphi today weekday leap calendar  System Globalization  today weekday leap calendar GetDayOfWeek libraries easiest method  calculating Algorithms for Calculating Day of Week calendars Calculating

http://www.delphigroups.info/2/5b/83334.html
Warning : ISO-8601 calls for Monday=1, Sunday=7. ISOday = (DayOfWeek+6) mod 7. -- ? John Stockton, Surrey, UK. j.

can also be usefull:

var
  FirstWeekDay: Integer = 2; { first day of week
    2 : monday (DIN 1355) }
  FirstWeekDate: Integer = 4; { date in first week
    1 : year starts on Jan 1st
    4 : first "4-day-week" (DIN 1355)
    7 : first complete week }

{ Returns date of first day of week }
function WeekToDate(AWeek, AYear: Integer): TDateTime;
begin
  Result := EncodeDate(AYear, 1, FirstWeekDate);
  Result := Result + (AWeek - 1) * 7 - ((DayOfWeek(Result) + (7 -
FirstWeekDay)) mod 7);
end;

{ Returns no. of week and year the week belongs to }
procedure DateToWeek(ADate: TDateTime; var AWeek, AYear: Integer);
var
  Month, Day: Word;
begin
  ADate := ADate - ((DayOfWeek(ADate) - FirstWeekDay + 7) mod 7) + 7 -
FirstWeekDate;
  DecodeDate(ADate, AYear, Month, Day);
  AWeek := (Trunc(ADate - EncodeDate(AYear, 1, 1)) div 7) + 1;
end; 


TASClient/ESBDates.pas at master · spring-archive ...https://github.com › spring-archive › TASClient › blob  Lobby Client for Windows written in Delphi. Contribute to spring-archive/TASClient development by creating an account on GitHub.

JclDateTime.pas  https://github.com › source › common The result is an integer between // 1 and 7, corresponding to Sunday through Saturday. ISODayOfWeek on the other hand returns an integer // between 1 and 7 ...

dayofweek · GitHub Topics https://github.com › topics › dayofweek Python function accepts mm/dd/yyyy and outputs day of week as string and integer. Any date since 1600. python calendar dates gregorian-calendar gregorian-date ...
 
GpDelphiUnits/src/GpTimezone.pas at master  https://github.com › gabr42 › blob › Gp... weekday (0 to 6, 0 = Sunday), and using a wDay value in the range 1 through 5 to select the correct day in the month. Year parameter is used to specify year ...

Calculate the local day of the week from Unix time and time ...https://gist.github.com › ...Calculate the local day of the week from Unix time and time zone offset - dayofweek.c.
 
SQL Server: DateTime.DayOfWeek translation · Issue #10404  https://github.com › aspnet › issues  Currently there is no translation for DayOfWeek property of DateTime value, it evaluates on client. When using in complex queries it can ...
 
filter on day of week · Issue #624  https://github.com › npgsql › issue try to filter a datetime field on the day of the week. For example (if I only want mondays): DayOfWeek d = DayOfWeek.Monday; filter.
 
ISOWeek.cs  https://github.com › src › Globalization... DayOfWeek) + 10) / 7; } // Day of week in ISO is represented by an integer from 1 through 7, beginning with Monday and ending with Sunday. // This matches ...

GpDelphiUnits/src/GpStuff.pas at master - gabr42 https://github.com › gabr42 › GpDelphiUnits › blob › G...A collection of my open sourced Delphi units. Contribute to gabr42/GpDelphiUnits development by creating an account on GitHub.
https://github.com/gabr42/GpDelphiUnits/tree/master

Calendar Globalization DayOfWeek https://learn.microsoft.com/zh-tw/dotnet/api/system.globalization.calendar.getdayofweek?view=net-7.0

WeekDay Get Current Week (VB.NET)  Private Function GetCurrentWeek() As String  Dim dat As DateTime = DateTime.Now() Dim culInfo As New CultureInfo(“zh-TW") Dim cal As Calendar = culInfo.Calendar() Dim week As Integer = cal.GetWeekOfYear(dat, CalendarWeekRule.FirstDay, DayOfWeek.Sunday) Return week.ToString(“00″)


algorithms date time
https://www.researchgate.net/publication/316558298_Date_Algorithms
Gregorian Calendar Julian date  Julian Day
https://liuzhenglaichn.gitbook.io/algorithm/date
https://en.wikibooks.org/wiki/Algorithm_Implementation/Date_and_time/Conversion_of_a_Gregorian_date_to_an_International_Fixed_Calendar_date
https://copyprogramming.com/t/algorithm-to-determine-if-a-given-datetime#google_vignette
https://www.boost.org/doc/libs/1_54_0/doc/html/date_time/gregorian.html
https://learn.microsoft.com/en-us/analysis-services/data-mining/microsoft-time-series-algorithm?view=asallproducts-allversions

NOAA’s National Geodetic Survey (NGS) provides the framework Existing algorithms and source code available
https://geodesy.noaa.gov/gps-toolbox/exist.htm

NTP NTC 熱敏 電阻 Positive Temperature Coefficient Negative positive temperature coefficient resistor

https://zh.wikipedia.org/wiki/%E7%83%AD%E6%95%8F%E7%94%B5%E9%98%BB
https://en.wikipedia.org/wiki/Thermistor
https://zh.wikipedia.org/wiki/%E6%B9%A7%E6%B5%AA%E9%9B%BB%E6%B5%81%E9%99%90%E5%88%B6%E5%99%A8
https://en.wikipedia.org/wiki/Inrush_current_limiter
負溫度係數Negative Temperature Coefficient (NTC)
正溫度係數(PTC,Positive Temperature Coefficient)
Positive Temperature Coefficient (PTC)
臨界溫度熱敏電阻CTR,Critical Temperature Resistance)

main distribution frame  Overvoltage protection 

MOV based modular solid-state switches and a concentrated
壓敏電阻Metal Oxide Varistors  MOV Metal Voltage Dependent Resistor

https://embeddedschool.in/list-types-of-protection-devices/

tvs over Voltage  protection component
tvs over Voltage  protection

Over-Voltage and Over-Current Protection Explained over Voltage  protection component Components such as MOV, GDT, SPG (Spark Gap Protectors) and TSS (Thyristor Surge Suppressors) serve as the primary form of protection against overvoltage. TVS and ESD

Optical spectrometer Spectrometry diffraction grating VHP grating Prism PGP spherical Conical surface Cone LENs Monochromator

 diffraction grating VHP grating Prism PGP spherical

The Optics of Spectrometry: A Guide to Spectroscopy Gratings

Direct-vision, dispersing prism-grating-prism (PGP) spectrograph used... | Download Scientific Diagram 

https://www.avantes.com/support/theoretical-background/introduction-to-spectrometers/

https://support.zemax.com/hc/zh-cn/articles/1500005578762-How-to-build-a-spectrometer-theory

Conical surface Cone 

Optical  Conical surface Cone grating Conical surface Cone  IR filter  Grating Equation

Optimization and Performance Evaluation of Apodization Function for Fiber Bragg Grating as Vital Sign Sensor | SpringerLink

Optical  Cone grating filter Optical filtering

2023年10月26日 星期四

mass spectrometer measures potassium DIY mass spectrometer measures potassium in dietary salt substitute

 https://youtu.be/nIKhUizkXxA?si=tmYzMywXETWHOeDm

button doorbell ESD Protection Circuits protection zener TVS uClamp3301D BAT54S BAV99 1N4148W AN015 - Input Protection Circuits

 https://electronics.stackexchange.com/questions/663623/mcu-input-pin-protection

button ESD Protection Circuits doorbell protection

 zener TVS uClamp3301D BAT54S BAV99  1N4148W 

https://resources.altium.com/p/beginners-guide-esd-protection-circuit-design-pcbs

https://circuitcellar.com/resources/ee-tips/active-esd-protection-for-microcontrollers-ee-tip/

Active ESD Protection for Microcontrollers (EE Tip #129) - Circuit Cellar

https://uk.rs-online.com/web/content/discovery/ideas-and-advice/push-button-switches-guide

https://www.electroschematics.com/musical-doorbell/

Schematic of the musical doorbell circuit

button  doorbell protection  Input Protection Circuits diode Isolated

interference - Microcontroller with a long wire for digital input - Electrical Engineering Stack Exchange
https://electronics.stackexchange.com/questions/49824/microcontroller-with-a-long-wire-for-digital-input
protection Protecting MCU digital input with 300m wires - Electrical Engineering Stack Exchange https://electronics.stackexchange.com/questions/607286/protecting-mcu-digital-input-with-300m-wires


https://en.wikipedia.org/wiki/Voltage_spike
SPD Switch  charge over switch EMC Filters  Surge Protection spikes Electromagnetic pulses
Inductor kickback
Voltage spike ELECTRICAL switch
Resistor-capacitor snubber configuration.
Resistor-capacitor snubber
Resistor-Capacitor (RC) Snubber Design for Power Switches | DigiKey
https://www.digikey.tw/en/articles/resistor-capacitor-rc-snubber-design-for-power-switches
https://www.quora.com/How-does-an-RC-Snubber-circuit-work
https://eepower.com/technical-articles/snubber-network-choices-design-and-evaluation/


delphi iocp socket tcpip network

     
https://sourceforge.net/p/synalist/code/HEAD/tree/trunk/
http://www.ararat.cz/synapse/doku.php/download
         Ararat Synapse Code  SynaSer serial library Synapse TCP/IP and serial library Winsock
http://visualsynapse.sourceforge.net/  
         VisualSynapse TCP/IP Delphi components based on Synapse.
http://synapse.ararat.cz/files/contrib/  
         Contributed Download Area - various samples and others.
http://synapse.ararat.cz/files/crypt/  
         Crypting libraries for SSL/TLS/SSH in Synapse
http://synapse.ararat.cz/files/W95ws2setup.exe  
         Winsock2 support for Windows95
http://www.wireshark.org/  
         Wireshark excellent tool for analyse and debugging of network communication.
https://www.nsoftware.com
https://www.nsoftware.com/products/
         Internet Communications and Security

voipobjects delphi-iocp-library voipobjects delphi-iocp-library  http://voipobjects.com/

https://github.com/tondrej/iocp-delphi
         Windows IO Completion Port wrapper class for Delphi and Free Pascal
          compilers: Delphi 7 or higher, Free Pascal 3.0.4 or higher
          targets: Windows XP/Windows Server 2003 or higher, both 32 and 64-bit

Fiber and IOCP API siqiyi/libfiber The high performance coroutine library
GitHub iqiyi libfiber OS platfroms including Linux, FreeBSD, MacOS, and Windows, which supports
 select, poll, epoll, kqueue, iocp, and even Windows GUI messages

Using beamer overlays with forest generated trees

HPScktSrvr at http://www.torry.net/ with the code pages.php?id= and a number sequence of 220#939383

Indy, ICS, Synapse, and Clever InetSuite,
ICS - The Internet Component Suite

iocpengine iocpengine - I/O Completion Port Engine for Delphi

TISAPIThreadPool; TIstringHelper; TIWPaintHandler. TIWPaintHandlerDsn. TIWPaintHandlerButton; TIWPaintHandlerCheckBox; TIWPaintHandlerComboBox ...

HttpSys2WebServer from DWScript use an IOCP-based server.

https://torry.net/components/internet/sockets/#939383

https://habr.com/ru/articles/145140/
Windows Sockets, IOCP и Delphi



//////////////////////////////////////////////////////////////////////////////////////////////////////
 Создание списков сокетов разных типов.
Инициализация подсистемы сокетов.
Создание очереди сообщений.
Создание пула для обработки очереди.
Создание событий для сокетов.
Создание потоков отслеживающих сокетные события( например подключение нового клиента)
procedure Init;
var
  WSAData: TWsaData;
  i: Integer;
begin
  gClients := TProtoStore.Create;
  gListeners := TProtoStore.Create;
  gServerClients := TProtoStore.Create;
  if WSAStartup(MAKEWORD(2, 2), WSAData) <> 0 then
    raise IOCPClientException.Create(sErrorInit_WSAtartup);
  gIOCP := CreateIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0, CPUCount * 2);
  if gIOCP = INVALID_HANDLE_VALUE then
    raise IOCPClientException.Create(sErrorInit_CreateIoCompletionPort);
  for i := 1 to CPUCount * 2 do
 begin
    SetLength(gWorkers, Length(gWorkers) + 1);
    gWorkers[Length(gWorkers) - 1] := TWorkerThread.Create();
  end;
  gListenerAcceptEvent := WSACreateEvent;
  if gListenerAcceptEvent = WSA_INVALID_EVENT then
    raise IOCPClientException.Create(sErrorInit_WSACreateEvent);
  gServerClientsCloseEvent := WSACreateEvent;
  if gServerClientsCloseEvent = WSA_INVALID_EVENT then
    raise IOCPClientException.Create(sErrorInit_WSACreateEvent);
  gClisentsConnectAndCloseEvents := WSACreateEvent;
  if gClisentsConnectAndCloseEvents = WSA_INVALID_EVENT then
    raise IOCPClientException.Create(sErrorInit_WSACreateEvent);
  gClientSocketEventThread := TSocketEventThread.Create
    (gClisentsConnectAndCloseEvents, gClients, ET_EVENT_SIGNALED);
  gClientSocketEventThread.Start;
  gServerClientsSocketEventThread := TSocketEventThread.Create
    (gServerClientsCloseEvent, gServerClients, ET_EVENT_SIGNALED);
  gServerClientsSocketEventThread.Start;
  gServerSocketEventThread := TSocketEventThread.Create(gListenerAcceptEvent,
    gListeners, ET_EVENT_SIGNALED);
  gServerSocketEventThread.Start;
end;

diocp DIOCP 无锁队列 ZeroMQ QWorkers uJobPusher RabbitMQ websocket network

 https://www.opensourceagenda.com/projects/zserver4d
内置抗量子密码支持 https://en.wikipedia.org/wiki/SHA-3  支持了5大美国国家标准技术研究所(NIST)高级加密标准算法      rc6加密,通讯协议支持 https://en.wikipedia.org/wiki/RC6     Twofish加密,通讯协议支持 https://en.wikipedia.org/wiki/Twofish     Serpent加密,通讯协议支持 https://en.wikipedia.org/wiki/Serpent_(cipher)     Mars加密,通讯协议支持 https://en.wikipedia.org/wiki/MARS_(cipher)     Rijndael加密,通讯协议支持 https://en.wikipedia.org/wiki/Advanced_Encryption_Standard

 https://www.nuget.org/packages/SimpleMsgPack
 https://www.twblogs.net/a/5ef0629c33cbe858769e7fee
zmq_strerror - 台部落

 https://www.oschina.net/project/widgets/_project_list?company=0&tag=12&lang=0&os=156&sort=favorite&recommend=false&cn=false&weekly=false&p=150&type=ajax

 http://m.mamicode.com/info-detail-1515096.html
DIOCP之DEMO-登陆验证设计(二)-码迷移动版-m.mamicode.com

http://bbs.2ccc.com/topic.asp?topicid=460182
DIOCP开源项目-DIOCP3
http://www.cnblogs.com/DKSoft/p/3889125.html
目前diocp3的开源地址 https://github.com/ymofen/diocp3
https://code.google.com/archive/p/diocp/source/default/source?page=33
Google Code Archive - Long-term storage for Google Code Project Hosting.

https://www.cnblogs.com/hnxxcxg/category/1168706.html
DIOCP TDiocpCoderTcpServer异步任务投递队列TDiocpCoderTcpServer异步任务投递队列 
 delphi中间件  TDiocpCoderTcpServer数据序列和还原 TDiocpCoderTcpServer数据序列和还原 

 http://wedelphi.com/f/4/
DIOCP | WeDelphi Forum

 https://gitee.com/ymofen/diocp-v5
diocp-v5: iocp, websocket, delphi,http

https://github.com/yangyxd/YxdIOCP
yangyxd/YxdIOCP: Delphi Windows IOCP 通讯模型封装,基于DIOCP。YxdIocp包含有支持大并发的TCP服务组件、HTTP服务组件、UDP服务组件、WebSocket服务组件,和TCP、UDP等基础客户端组件。

https://github.com/ymofen/diocp-v5

diocp DIOCP  无锁队列 ZeroMQ QWorkers
uJobPusher RabbitMQ websocket

  diocp  websocket DIOCP 开源地址 DIOCP-v5开源项目地址https://github.com ... WebSocket + Spring Security + SpringData-Jpa + MySql工程结构说明java .

webflux · GitHub Topics

flex开源项目地址   https://github.com/flex-users/flexlib

 

 

Awesome Delphi

 Awesome Delphi
https://www.ancii.com/ayb3e4z7x/
Delphi编程技巧大全     http://www.delphitop.com/
Delphi盒子 www.2ccc.com
2Pascal-新时代的Pascal http://www.2pascal.com
WeDelphi http://www.WeDelphi.com
新大富翁论坛 http://www.dfwlt.com/forum.php
万一的博客:http://www.cnblogs.com/del/
原Delphi窖洞洞主博客:http://www.cnblogs.com/xalion
CnPack:http://www.cnpack.org/
       https://github.com/cnpack/cnvcl
QDAC(QQ官方群 250530692):http://blog.qdac.cc/
OrangeUI-Delphi移动开发利器(OrangeUI技术支持QQ群:10900297)
RPMP-Restful Plugin Midware for Pascal(QQ 群: 289501953): https://github.com/ZYHPRO/RPMP
MyBean轻量级配置框架,插件交流群: 205486036: https://github.com/ymofen/delphi-framework-MyBean
ABFrameWork(Delphi 框架) QQ交流群: 307455944 (非开源)
开源网络库之Delphi Cross Socket,由WiNDDRiVER()开发的跨平台网络库,代码风格优美,注释详细,唯一不足的是Demo略少,在Github上开源:https://github.com/winddriver/Delphi-Cross-SocketQQ交流群:152678031
开源网络库之DIOCP,由天地弦(www.diocp.org)开发的网络并发框架,多线程管理库diocp,经过长时间的测试,运行极为稳定,在Github上开源:https://github.com/ymofen/diocp-v5QQ交流群:638127021
ZServer4D,细雨老仙从商业项目(游戏类)剥离而出的云服务器中间件,可以承载百万级在线的分布式长连接负载,在Github上开源:https://github.com/PassByYou888/ZServer4DQQ交流群:490269542
FMXUI 跨平台UI组件库 https://github.com/yangyxd/FMXUI
YxdJSON Delphi 高性能 JSON 库(支持RTTI和序列化操作)支持平台: Windows, Android, iOS, Mac OS https://github.com/yangyxd/YxdJson
YxdIocp Delphi 高性能 IOCP 通讯模型组件包 (包括TCP、UDP、HTTP、WebSocket等服务器组件和客户端组件)支持平台: Windows https://github.com/yangyxd/YxdIOCP
YxdWorker Delphi 多线程高并发作务引擎 支持平台: Windows, Android, iOS, Mac OS https://github.com/yangyxd/YxdWorker
YxdGameFrame Unity 轻量级游戏开发消息引擎框架 支持平台: Windows, Android, iOS, Mac OS 等 https://github.com/yangyxd/YxdGameFrame
Wke (miniblink) For Delphi 对Wke,miniblink的封装。实现支持html5 的 WebUI(相对于dcef来说,它只需要一个dll,更加轻量),也可以用来制作内嵌的小型浏览器。支持平台: Windows (WinXP 及以上)https://github.com/yangyxd/wke-for-delphi
mOrMot: https://github.com/synopse/mORMot

https://github.com/Fr0sT-Brutal/awesome-delphi

Delphi IDE Theme Editor(DITE)是一个工具,用于自定义像Delphi(RAD Studio)这样的几个Object Pascal IDE的IDE颜色突出显示。
https://github.com/RRUZ/delphi-ide-theme-editor

DMVCFramework(简称)是一个流行的,功能强大的Delphi网页解决方案框架
https://github.com/danieleteti/delphimvcframework

Delphi REST Client API
使用Delphi REST客户端API来使用以任何编程语言编写的REST服务。
https://github.com/fabriciocolombo/delphi-rest-client-api

Virtual-TreeView
虚拟树视图是从底层构建的Delphi树视图控件。多年的发展使其成为当今最灵活和先进的树形控制系统之一。虚拟树视图开始提出改进现有解决方案的许多方面,并引入了一些前所未有的新技术和原理。
https://github.com/Virtual-TreeView/Virtual-TreeView

Delphi-OpenCV是Delphi中OpenCV库头文件的翻译。
https://github.com/Laex/Delphi-OpenCV

DUnitX是一个新的测试框架,从DUnit,NUnit和其他测试框架中提出了一些想法。它被设计为与Delphi 2010或更高版本一起使用,它使用了旧版Delphi中没有的语言/ RTL功能。
https://github.com/VSoftTechnologies/DUnitX

Delphi IDE Colorizer(DIC)是一个插件,它可以使RAD Studio IDE的工作空间
https://github.com/RRUZ/Delphi-IDE-Colorizer

CEF4Delphi是由SalvadorDíazFau创建的一个开源项目,用于在基于Delphi的应用程序中嵌入基于Chromium的浏览器。
https://github.com/salvadordf/CEF4Delphi

OmniThreadLibrary是一个简单易用的Delphi线程库。OTL的主要“卖点”(除了价格之外)是力量,简单和开放。只需要几行代码,就可以设置多个线程,在它们之间发送消息,处理Windows消息等等。
https://github.com/gabr42/OmniThreadLibrary

Power Supply current consumption consumption Reducing Relay Power Consumption Circuit Diagram Power-Saving Relay Driver | Full Electronics Project with Source Code

 Power Supply current consumption consumption   

Reducing Relay Power Consumption Circuit Diagram  

Power-Saving Relay Driver | Full Electronics Project with Source Code   

logic threshold  analogue switch  MAX4624 reaches  threshold
Reducing Relay Power Consumption Circuit Diagram

https://www.electroschematics.com/low-current-relay/

Power Supply current consumption consumption Reducing Relay Power Consumption Circuit Diagram
https://www.eeweb.com/reducing-relay-power-consumption/

https://www.eeweb.com/dual-relay-driver-board-circuit-schematic/
https://subscription.packtpub.com/book/iot-and-hardware/9781838982461/10/ch10lvl1sec14/exploring-a-relay-driver-circuit
Infrared Sensor Based Power Saver | Circuit Diagram Available
https://www.electronicsforu.com/electronics-projects/power-saving-relay-driver

https://www.homemade-circuits.com/how-to-make-relay-driver-stage-in/
Transistor Relay Driver Circuit with Formula and Calculations | Homemade Circuit Projects In this article we will comprehensively study a transistor relay driver circuit and learn how to design its configuration by calculating the parameters through formulas. Importance of Relay Relays are 











2023年10月25日 星期三

delphi ping scanner исходник интернет icmp. dll delphi ping интернет icmp. dll Русское программирование на Delphi. network

 https://delphisources.ru/forum/showthread.php?t=29617
http://www.delphimaster.ru/articles/icmp.html
https://www.thoughtco.com/implementing-ping-without-using-raw-sockets-4068869
http://www.codenet.ru/progr/delphi/stat/ping.php
http://forum.delphimaster.net/cgi-bin/forum.pl?id=1530002471&n=4&toprint=1
http://forum.delphimaster.net/cgi-bin/forum.pl?id=1530002471&n=4
https://kursovik.com/programming.html?lang=delphi


Вернуться           Форум по Delphi программированию > Все о Delphi > Интернет и сети
Перезагрузить страницу Нужно сделать ping на Delphi

Всем доброго времени суток! Задача избитая, но полноценного решения не нашел. Нужно сделать ping на Delphi. Нашел вроде хороший пример http://www.delphimaster.ru/articles/icmp.html , но не хватает мозгов как сделать, что бы размер буффера можно бло указывать произвольно? Не хватает мозгов переделать на динамический массив буффера данных. Кроме того хотелось бы услышать мнение по правильности этого кода, есть мнение, что этот код может вызывать утечки памяти... И еще интересно - в Delphi XE случайно не сделали "обертку" под использование функций из ICMP.DLL?





unit PingUnits;
 
interface
 
function Ping(Address:RawByteString):Boolean;
 
implementation
 
uses
  Windows, Winsock, SysUtils;
 
const
  IP_STATUS_BASE=11000;
  IP_SUCCESS=0;
  IP_BUF_TOO_SMALL=11001;
  IP_DEST_NET_UNREACHABLE=11002;
  IP_DEST_HOST_UNREACHABLE=11003;
  IP_DEST_PROT_UNREACHABLE=11004;
  IP_DEST_PORT_UNREACHABLE=11005;
  IP_NO_RESOURCES=11006;
  IP_BAD_OPTION=11007;
  IP_HW_ERROR=11008;
  IP_PACKET_TOO_BIG=11009;
  IP_REQ_TIMED_OUT=11010;
  IP_BAD_REQ=11011;
  IP_BAD_ROUTE=11012;
  IP_TTL_EXPIRED_TRANSIT=11013;
  IP_TTL_EXPIRED_REASSEM=11014;
  IP_PARAM_PROBLEM=11015;
  IP_SOURCE_QUENCH=11016;
  IP_OPTION_TOO_BIG=11017;
  IP_BAD_DESTINATION=11018;
  IP_ADDR_DELETED=11019;
  IP_SPEC_MTU_CHANGE=11020;
  IP_MTU_CHANGE=11021;
  IP_UNLOAD=11022;
  IP_GENERAL_FAILURE=11050;
  IP_PENDING=11255;
 
  MAX_IP_STATUS=IP_GENERAL_FAILURE;
 
type
  ip_option_information = packed record       // Информация заголовка IP (Наполнение
                                              // этой структуры и формат полей описан в RFC791.
      Ttl : byte;                                   // Время жизни (используется traceroute-ом)
      Tos : byte;                                   // Тип обслуживания, обычно 0
      Flags : byte;                             // Флаги заголовка IP, обычно 0
      OptionsSize : byte;                         // Размер данных в заголовке, обычно 0, максимум 40
      OptionsData : Pointer;                    // Указатель на данные
  end;
 
 icmp_echo_reply = packed record
      Address : u_long;                            // Адрес отвечающего
      Status : u_long;                           // IP_STATUS (см. ниже)
      RTTime : u_long;                           // Время между эхо-запросом и эхо-ответом
                                               // в миллисекундах
      DataSize : u_short;                        // Размер возвращенных данных
      Reserved : u_short;                        // Зарезервировано
      Data : Pointer;                            // Указатель на возвращенные данные
      Options : ip_option_information;         // Информация из заголовка IP
  end;
 
  PIPINFO = ^ip_option_information;
  PVOID = Pointer;
 
  function IcmpCreateFile() : THandle; stdcall; external 'ICMP.DLL' name 'IcmpCreateFile';
  function IcmpCloseHandle(IcmpHandle : THandle) : BOOL; stdcall; external 'ICMP.DLL'  name 'IcmpCloseHandle';
  function IcmpSendEcho(
                    IcmpHandle : THandle;    // handle, возвращенный IcmpCreateFile()
                    DestAddress : u_long;    // Адрес получателя (в сетевом порядке)
                    RequestData : PVOID;     // Указатель на посылаемые данные
                    RequestSize : Word;      // Размер посылаемых данных
                    RequestOptns : PIPINFO;  // Указатель на посылаемую структуру
                                             // ip_option_information (может быть nil)
                    ReplyBuffer : PVOID;     // Указатель на буфер, содержащий ответы.
                    ReplySize : DWORD;       // Размер буфера ответов
                    Timeout : DWORD          // Время ожидания ответа в миллисекундах
                   ) : DWORD; stdcall; external 'ICMP.DLL' name 'IcmpSendEcho';
 
 
 
function PingIp(Address:RawByteString):Boolean;
var
  hIP : THandle;
  pingBuffer : array [0..31] of Char;
  pIpe : ^icmp_echo_reply;
  wVersionRequested : WORD;
  lwsaData : WSAData;
  error : DWORD;
  destAddress : In_Addr;
begin
  Result:=False;
  hIP := IcmpCreateFile();
  GetMem( pIpe,
          sizeof(icmp_echo_reply) + sizeof(pingBuffer));
  try
    pIpe.Data := @pingBuffer;
    pIpe.DataSize := sizeof(pingBuffer);
 
    wVersionRequested := MakeWord(1,1);
    error := WSAStartup(wVersionRequested,lwsaData);
    if (error <> 0) then
    begin
      Exit;
    end;
    destAddress.S_addr:=inet_addr(PAnsiChar(Address));
    IcmpSendEcho(hIP,
                 destAddress.S_addr,
                 @pingBuffer,
                 sizeof(pingBuffer),
                 Nil,
                 pIpe,
                 sizeof(icmp_echo_reply) + sizeof(pingBuffer),
                 5000);
 
    error := GetLastError();
    if (error <> 0) then
    begin
      Exit;
    end;
    Result:=pIpe.Status=IP_SUCCESS;
  finally
    IcmpCloseHandle(hIP);
    WSACleanup();
    FreeMem(pIpe);
  end;
end;
 
function HostToIP(name: RawByteString; var Ip: RawByteString): Boolean;
var
  wsdata : TWSAData;
  hostName : array [0..255] of ansichar;
  hostEnt : PHostEnt;
  addr : PAnsiChar;
begin
  WSAStartup ($0101, wsdata);
  try
    gethostname (@hostName[0], sizeof (hostName));
    StrPCopy(hostName, name);
    hostEnt := gethostbyname (hostName);
    if Assigned (hostEnt) then
      if Assigned (hostEnt^.h_addr_list) then begin
        addr := hostEnt^.h_addr_list^;
        if Assigned (addr) then begin
          IP := Format ('%d.%d.%d.%d', [byte (addr [0]),
          byte (addr [1]), byte (addr [2]), byte (addr [3])]);
          Result := True;
        end
        else
          Result := False;
      end
      else
        Result := False
    else begin
      Result := False;
    end;
  finally
    WSACleanup;
  end
end;
 
function Ping(Address:RawByteString):Boolean;
var
  s:RawByteString;
 
begin
  Result:=HostToIP(Address,s);
  if Result then
    Result:=PingIp(s);
end;
 
 
end.




////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
unit PingUnits;
 
interface
 
function Ping(Address:RawByteString):Boolean;
 
implementation
 
uses
  Windows, Winsock, SysUtils;
 
const
  IP_STATUS_BASE=11000;
  IP_SUCCESS=0;
  IP_BUF_TOO_SMALL=11001;
  IP_DEST_NET_UNREACHABLE=11002;
  IP_DEST_HOST_UNREACHABLE=11003;
  IP_DEST_PROT_UNREACHABLE=11004;
  IP_DEST_PORT_UNREACHABLE=11005;
  IP_NO_RESOURCES=11006;
  IP_BAD_OPTION=11007;
  IP_HW_ERROR=11008;
  IP_PACKET_TOO_BIG=11009;
  IP_REQ_TIMED_OUT=11010;
  IP_BAD_REQ=11011;
  IP_BAD_ROUTE=11012;
  IP_TTL_EXPIRED_TRANSIT=11013;
  IP_TTL_EXPIRED_REASSEM=11014;
  IP_PARAM_PROBLEM=11015;
  IP_SOURCE_QUENCH=11016;
  IP_OPTION_TOO_BIG=11017;
  IP_BAD_DESTINATION=11018;
  IP_ADDR_DELETED=11019;
  IP_SPEC_MTU_CHANGE=11020;
  IP_MTU_CHANGE=11021;
  IP_UNLOAD=11022;
  IP_GENERAL_FAILURE=11050;
  IP_PENDING=11255;
 
  MAX_IP_STATUS=IP_GENERAL_FAILURE;
 
type
  ip_option_information = packed record       // Информация заголовка IP (Наполнение
                                              // этой структуры и формат полей описан в RFC791.
      Ttl : byte;                                   // Время жизни (используется traceroute-ом)
      Tos : byte;                                   // Тип обслуживания, обычно 0
      Flags : byte;                             // Флаги заголовка IP, обычно 0
      OptionsSize : byte;                         // Размер данных в заголовке, обычно 0, максимум 40
      OptionsData : Pointer;                    // Указатель на данные
  end;
 
 icmp_echo_reply = packed record
      Address : u_long;                            // Адрес отвечающего
      Status : u_long;                           // IP_STATUS (см. ниже)
      RTTime : u_long;                           // Время между эхо-запросом и эхо-ответом
                                               // в миллисекундах
      DataSize : u_short;                        // Размер возвращенных данных
      Reserved : u_short;                        // Зарезервировано
      Data : Pointer;                            // Указатель на возвращенные данные
      Options : ip_option_information;         // Информация из заголовка IP
  end;
 
  PIPINFO = ^ip_option_information;
  PVOID = Pointer;
 
  function IcmpCreateFile() : THandle; stdcall; external 'ICMP.DLL' name 'IcmpCreateFile';
  function IcmpCloseHandle(IcmpHandle : THandle) : BOOL; stdcall; external 'ICMP.DLL'  name 'IcmpCloseHandle';
  function IcmpSendEcho(
                    IcmpHandle : THandle;    // handle, возвращенный IcmpCreateFile()
                    DestAddress : u_long;    // Адрес получателя (в сетевом порядке)
                    RequestData : PVOID;     // Указатель на посылаемые данные
                    RequestSize : Word;      // Размер посылаемых данных
                    RequestOptns : PIPINFO;  // Указатель на посылаемую структуру
                                             // ip_option_information (может быть nil)
                    ReplyBuffer : PVOID;     // Указатель на буфер, содержащий ответы.
                    ReplySize : DWORD;       // Размер буфера ответов
                    Timeout : DWORD          // Время ожидания ответа в миллисекундах
                   ) : DWORD; stdcall; external 'ICMP.DLL' name 'IcmpSendEcho';
 
 
 
function PingIp(Address:RawByteString):Boolean;
var
  hIP : THandle;
  pingBuffer : array [0..31] of Char;
  pIpe : ^icmp_echo_reply;
  wVersionRequested : WORD;
  lwsaData : WSAData;
  error : DWORD;
  destAddress : In_Addr;
begin
  Result:=False;
  hIP := IcmpCreateFile();
  GetMem( pIpe,
          sizeof(icmp_echo_reply) + sizeof(pingBuffer));
  try
    pIpe.Data := @pingBuffer;
    pIpe.DataSize := sizeof(pingBuffer);
 
    wVersionRequested := MakeWord(1,1);
    error := WSAStartup(wVersionRequested,lwsaData);
    if (error <> 0) then
    begin
      Exit;
    end;
    destAddress.S_addr:=inet_addr(PAnsiChar(Address));
    IcmpSendEcho(hIP,
                 destAddress.S_addr,
                 @pingBuffer,
                 sizeof(pingBuffer),
                 Nil,
                 pIpe,
                 sizeof(icmp_echo_reply) + sizeof(pingBuffer),
                 5000);
 
    error := GetLastError();
    if (error <> 0) then
    begin
      Exit;
    end;
    Result:=pIpe.Status=IP_SUCCESS;
  finally
    IcmpCloseHandle(hIP);
    WSACleanup();
    FreeMem(pIpe);
  end;
end;
 
function HostToIP(name: RawByteString; var Ip: RawByteString): Boolean;
var
  wsdata : TWSAData;
  hostName : array [0..255] of ansichar;
  hostEnt : PHostEnt;
  addr : PAnsiChar;
begin
  WSAStartup ($0101, wsdata);
  try
    gethostname (@hostName[0], sizeof (hostName));
    StrPCopy(hostName, name);
    hostEnt := gethostbyname (hostName);
    if Assigned (hostEnt) then
      if Assigned (hostEnt^.h_addr_list) then begin
        addr := hostEnt^.h_addr_list^;
        if Assigned (addr) then begin
          IP := Format ('%d.%d.%d.%d', [byte (addr [0]),
          byte (addr [1]), byte (addr [2]), byte (addr [3])]);
          Result := True;
        end
        else
          Result := False;
      end
      else
        Result := False
    else begin
      Result := False;
    end;
  finally
    WSACleanup;
  end
end;
 
function Ping(Address:RawByteString):Boolean;
var
  s:RawByteString;
 
begin
  Result:=HostToIP(Address,s);
  if Result then
    Result:=PingIp(s);
end;
 
 
end.



В общем вместо
Код:
1
    
pingBuffer : array [0..31] of AnsiChar;
я написал
Код:
1
    
pingBuffer : array of AnsiChar;
Потом инициализирую переменную
Код:
1
    
SetLength(pingBuffer, 1452);
и заменил везде
Код:
1
    
sizeof(pingBuffer)
на
Код:
1
    
Length(pingBuffer)
Адрес массива передаю также:
Код:
1
    
pIpe.Data := @pingBuffer;
Вроде все работает, но вопрос - правильно ли я все сделал? Больше всего волнует вопрос: передача адреса на статический и динамический массив одинаково выполняется в Делфи? Я имею ввиду синтаксически...

Да, на счет 64 байт я тоже заметил, поэтому явно везде указал AnsiChar. А за @pingBuffer[0] спасибо, ошибок при работе не вызвало, остается только креститься и молиться, что бы работало



 Note that the Winsock 1.1 WSAStartup function must be called prior to using the functions exposed by ICMP.DLL. If you do not do this, the first call to IcmpSendEcho will fail with error 10091 (WSASYSNOTREADY).

Below you can find the Ping unit's source code. Here are two examples of usage.
Example 1: Code Snippet

uses Ping;...​
const ADP_IP = '208.185.127.40'; (* http://delphi.about.com *)
beginIf  Ping.Ping(ADP_IP) then ShowMessage('About Delphi Programming reachable!');
end;

Example 2: Console Mode Delphi Program

Our next example is a console mode Delphi program that uses the Ping unit: . Here's the Ping unit's source:

unit Ping;​
interfaceuses
Windows, SysUtils, Classes;
type
TSunB = packed record
s_b1, s_b2, s_b3, s_b4: byte;
end;
TSunW = packed record
s_w1, s_w2: word;
end;
PIPAddr = ^TIPAddr;
TIPAddr = record
case integer of
0: (S_un_b: TSunB);1: (S_un_w: TSunW);2: (S_addr: longword);
end;IPAddr = TIPAddr;
function IcmpCreateFile : THandle; stdcall; external 'icmp.dll';
function IcmpCloseHandle (icmpHandle : THandle) : boolean;
stdcall; external 'icmp.dll'
function IcmpSendEcho
(IcmpHandle : THandle; DestinationAddress : IPAddr;
RequestData : Pointer; RequestSize : Smallint;
RequestOptions : pointer;
ReplyBuffer : Pointer;
ReplySize : DWORD;
Timeout : DWORD) : DWORD; stdcall; external 'icmp.dll';
function Ping(InetAddress : string) : boolean;
implementationuses
WinSock;
function Fetch(var AInput: string;
const ADelim: string = ' ';
const ADelete: Boolean = true)
: string;
var
iPos: Integer;
begin
if ADelim = #0 then begin
// AnsiPos does not work with #0
iPos := Pos(ADelim, AInput);
end else begin
iPos := Pos(ADelim, AInput);
end;
if iPos = 0 then begin
Result := AInput;
if ADelete then begin
AInput := '';
end;
end else begin
result := Copy(AInput, 1, iPos - 1);
if ADelete then begin
Delete(AInput, 1, iPos + Length(ADelim) - 1);
end;
end;
end;
procedure TranslateStringToTInAddr(AIP: string; var AInAddr);
var
phe: PHostEnt;pac: PChar;GInitData: TWSAData;
begin
WSAStartup($101, GInitData);
try
phe := GetHostByName(PChar(AIP));
if Assigned(phe) thenbegin
pac := phe^.h_addr_list^;
if Assigned(pac) then
begin
with TIPAddr(AInAddr).S_un_b do begin
s_b1 := Byte(pac[0]);s_b2 := Byte(pac[1]);s_b3 := Byte(pac[2]);s_b4 := Byte(pac[3]);
end;
end
else
begin
raise Exception.Create('Error getting IP from HostName');
end;
end
else
begin
raise Exception.Create('Error getting HostName');
end;
except
FillChar(AInAddr, SizeOf(AInAddr), #0);
end;WSACleanup;
end;
function Ping(InetAddress : string) : boolean;
var
Handle : THandle;
InAddr : IPAddr;
DW : DWORD;
rep : array[1..128] of byte;
begin
result := false;Handle := IcmpCreateFile;
if Handle = INVALID_HANDLE_VALUE then
Exit;
TranslateStringToTInAddr(InetAddress, InAddr);
DW := IcmpSendEcho(Handle, InAddr, nil, 0, nil, @rep, 128, 0);Result := (DW 0);IcmpCloseHandle(Handle);
end;​
end.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




Пингуем (Ping) под Delphi
1
Пингуем (Ping) под Delphi

Протокол Ping предназначен для тестирования компьютерных соединений в Интернете путём посылки через протокол Internet Protocol (IP) по обределённому адресу сообщения и ожидания от него ответа.

ICMP - Internet Control Message Protocol. ICMP служит для передачи сообщений об ошибках а так же управляющих сообщений . ICMP-тест может показать насколько быстро проходит информация между двумя узлами в Интернете.

    Запускаем Delphi;
    В Новом проекте добавляем в форму Tbutton, Tedit и Tmemo;
    Вставляем “winsock”;
    объявляем структурку для IP-заголовка:

type IPINFO = record
  Ttl     : char;
  Tos     : char;
  IPFlags : char;
  OptSize : char;
  Options : ^char;
end;

5. объявляем структурку для хранения ICMP пакета:

type  ICMPECHO = record
  Source   : longint;
  Status   : longint;
  RTTime   : longint;
  DataSize : Shortint;
  Reserved : Shortint;
  pData    : ^variant;
  i_ipinfo : IPINFO;
end;

6. Объявляем функции и процедуры, которые мы будем вызывать из ICMP.DLL

TIcmpCreateFile =
  function():integer;{$IFDEF WIN32} stdcall; {$ENDIF}
TIcmpCloseHandle =
  procedure(var handle:integer);{$IFDEF WIN32} stdcall;{$ENDIF}
TIcmpSendEcho =
  function(var handle:integer; endereco:DWORD; buffer:variant;
  tam:WORD; IP:IPINFO; ICMP:ICMPECHO; tamicmp:DWORD;
  tempo:DWORD):DWORD;{$IFDEF WIN32} stdcall; {$ENDIF}

7. В Tbutton в событие Onclick вставляем следующий код:

procedure TForm1.Button1Click(Sender: TObject);
var
wsadt : wsadata;
icmp :icmpecho;
HNDicmp : integer;
hndFile :integer;
Host :PHostEnt;
Destino :in_addr;
Endereco :^DWORD;
IP : ipinfo;
Retorno :integer;
dwRetorno :DWORD;
x :integer;

IcmpCreateFile : TIcmpCreateFile;
IcmpCloseHandle : TIcmpCloseHandle;
IcmpSendEcho : TIcmpSendEcho;

begin
if (edit1.Text = '') then begin
Application.MessageBox('Enter a HostName ro a IP Adress',
'Error', MB_OK);
exit;
end;
HNDicmp := LoadLibrary('ICMP.DLL');
if (HNDicmp  0) then begin
@IcmpCreateFile := GetProcAddress(HNDicmp,'IcmpCreateFile');
@IcmpCloseHandle := GetProcAddress(HNDicmp,'IcmpCloseHandle');
@IcmpSendEcho := GetProcAddress(HNDicmp,'IcmpSendEcho');
if (@IcmpCreateFile=nil) or (@IcmpCloseHandle=nil) or
   (@IcmpSendEcho=nil) then begin
Application.MessageBox('Error getting ICMP Adress','Error', MB_OK);
FreeLibrary(HNDicmp);
end;
end;
Retorno := WSAStartup($0101,wsadt);

if (Retorno  0) then begin
Application.MessageBox('Can?t Load WinSockets','WSAStartup', MB_OK);
WSACleanup();
FreeLibrary(HNDicmp);
end;

Destino.S_addr := inet_addr(Pchar(Edit1.text));
if (Destino.S_addr = 0) then begin
Host := GetHostbyName(PChar(Edit1.text));
end
else begin
Host := GetHostbyAddr(@Destino,sizeof(in_addr), AF_INET);
end;

if (host = nil) then begin
Application.MessageBox('Host not found','Error', MB_OK);
WSACleanup();
FreeLibrary(HNDicmp);
exit;
end;
memo1.Lines.Add('Pinging ' + Edit1.text);

Endereco := @Host.h_addr_list;

HNDFile := IcmpCreateFile();
for x:= 0 to 4 do begin
Ip.Ttl := char(255);
Ip.Tos := char(0);
Ip.IPFlags := char(0);
Ip.OptSize := char(0);
Ip.Options := nil;

dwRetorno := IcmpSendEcho(
HNDFile,
Endereco^,
null,
0,
Ip,
Icmp,
sizeof(Icmp),
DWORD(5000));
Destino.S_addr := icmp.source;
Memo1.Lines.Add('Ping ' + Edit1.text);
end;


IcmpCLoseHandle(HNDFile);
FreeLibrary(HNDicmp);
WSACleanup();
end;

У данного примера есть один недостаток - программа не воспримет доменное имя, только IP-адресс. Для пользователей NT не используйте функцию IcmpCloseHandle. Это всё.....

Ну и в конце полный исходный код примера:

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
winsock, StdCtrls;

type
IPINFO = record
Ttl :char;
Tos :char;
IPFlags :char;
OptSize :char;
Options :^char;
end;

type
ICMPECHO = record
Source :longint;
Status :longint;
RTTime :longint;
DataSize:Shortint;
Reserved:Shortint;
pData :^variant;
i_ipinfo:IPINFO;
end;

TIcmpCreateFile =
  function():integer; {$IFDEF WIN32} stdcall; {$ENDIF}
TIcmpCloseHandle =
  procedure(var handle:integer);{$IFDEF WIN32} stdcall; {$ENDIF}
TIcmpSendEcho =
  function(var handle:integer; endereco:DWORD; buffer:variant;
  tam:WORD; IP:IPINFO; ICMP:ICMPECHO; tamicmp:DWORD;
  tempo:DWORD):DWORD;{$IFDEF WIN32} stdcall; {$ENDIF}

type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public

end;

var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var
wsadt : wsadata;
icmp :icmpecho;
HNDicmp : integer;
hndFile :integer;
Host :PHostEnt;
Destino :in_addr;
Endereco :^DWORD;
IP : ipinfo;
Retorno :integer;
dwRetorno :DWORD;
x :integer;

IcmpCreateFile : TIcmpCreateFile;
IcmpCloseHandle : TIcmpCloseHandle;
IcmpSendEcho : TIcmpSendEcho;

begin
if (edit1.Text = '') then begin
Application.MessageBox('Digite um HostName ou um End. IP',
'Error', MB_OK);
exit;
end;
HNDicmp := LoadLibrary('ICMP.DLL');
if (HNDicmp  0) then begin
@IcmpCreateFile := GetProcAddress(HNDicmp,'IcmpCreateFile');
@IcmpCloseHandle := GetProcAddress(HNDicmp,'IcmpCloseHandle');
@IcmpSendEcho := GetProcAddress(HNDicmp,'IcmpSendEcho');
if (@IcmpCreateFile=nil) or (@IcmpCloseHandle=nil) or
   (@IcmpSendEcho=nil) then begin
Application.MessageBox('Erro pegando endereзos ICMP','Error', MB_OK);
FreeLibrary(HNDicmp);
end;
end;
Retorno := WSAStartup($0101,wsadt);

if (Retorno  0) then begin
Application.MessageBox('Nгo foi possнvel carregar WinSockets',
    'WSAStartup',MB_OK);
WSACleanup();
FreeLibrary(HNDicmp);
end;

Destino.S_addr := inet_addr(Pchar(Edit1.text));
if (Destino.S_addr = 0) then begin
Host := GetHostbyName(PChar(Edit1.text));
end
else begin
Host := GetHostbyAddr(@Destino,sizeof(in_addr), AF_INET);
end;

if (host = nil) then begin
Application.MessageBox('Host nгo encontrado','Error', MB_OK);
WSACleanup();
FreeLibrary(HNDicmp);
exit;
end;
memo1.Lines.Add('Pinging ' + Edit1.text);

Endereco := @Host.h_addr_list;

HNDFile := IcmpCreateFile();
for x:= 0 to 4 do begin
Ip.Ttl := char(255);
Ip.Tos := char(0);
Ip.IPFlags := char(0);
Ip.OptSize := char(0);
Ip.Options := nil;

dwRetorno := IcmpSendEcho(
HNDFile,
Endereco^,
null,
0,
Ip,
Icmp,
sizeof(Icmp),
DWORD(5000));
Destino.S_addr := icmp.source;
Memo1.Lines.Add('Pingou ' + Edit1.text);
end;


IcmpCLoseHandle(HNDFile);
FreeLibrary(HNDicmp);
WSACleanup();
end;

end.