3
Suppose that unit B's initialization is in progress, and that a type from unit A is used. Unit A has not completed
initialization, and such a reference could cause an access violation.
The unit initialization should only use types defined within that unit. Using types from outside the unit will impact unit
initialization, and could cause an access violation, as noted above.
Unit initialization for DLLs happens automatically; it is triggered when a type within the DLL is referenced. Applications
created with other .NET languages can use Delphi for .NET assemblies without concern
for the details of unit
initialization.
219
Program Control
The concepts of passing parameters and function result processing are important to understand before you
undertake your application projects Treatment of parameters and function results is determined by several factors,
including calling conventions,
parameter semantics, and the type and size of the value being passed.
This following topics are covered in this material:
Passing Parameters.
Handling Function Results.
Handling Method Calls.
Understanding Exit Procedures.
Dostları ilə paylaş: