Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #16  
Antiguo 05-04-2007
Avatar de vtdeleon
vtdeleon vtdeleon is offline
Miembro
 
Registrado: abr 2004
Ubicación: RD & USA
Posts: 3.236
Poder: 26
vtdeleon Va por buen camino
Yo tampoco sé, pero según esto:
Cita:
The {$WEAKPACKAGEUNIT} directive is used in rare situations where the units in your package may be referencing DLLs that may not be present on every system. To be precise, this directive was actually created as part of a solution to another problem. Specifically, consider two units, each in a separate package, and both units reference the same DLL. If an application uses both of these units, then two copies of the DLL will be loaded into memory, which causes all kinds of problems with initialization and global variables. The solution to this problem is to put the interface unit of the DLL into a common package.

However, what happens if the DLL is not present on the system? The common package cannot be loaded because it is statically linked to the DLL through the interface unit. This is where the $WEAKPACKAGEUNIT directive comes in. Specifically, this directive affects the way a DCU file is stored in a package's DCP and BPL files. If {$WEAKPACKAGEUNIT ON} appears in a unit file, the compiler omits the unit from the BPL file whenever possible, and creates a non-packaged copy of the unit and places it in the package's DCP file. The non-packaged unit will then be statically linked into applications or other packages when needed.

For example, suppose we have a package called Package1 that contains only one unit, Unit1. Now further suppose that Unit1 does not use any further units, but it makes calls to Rare.dll. If the {$WEAKPACKAGEUNIT ON} directive is inserted in Unit1.pas before compiling, Unit1 will not be included in Package1.bpl. As a result, the Rare.dll will not have to be distributed with Package1. However, Unit1 will still be included in Package1.dcp. If Unit1 is referenced by another package or application that uses Package1, Unit1 will be copied from Package1.dcp and compiled directly into the project.
Enlace
__________________
Van Troi De León
(Not) Guía, Code vB:=Delphi-SQL, ¿Cómo?
Viajar en el tiempo no es teóricamente posible, pues si lo fuera, ya estarían aqui contándonos al respecto!
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Delphi con Vista....¿? mia Varios 1 06-02-2007 17:18:14
Vista trex2000 MS SQL Server 4 03-01-2007 20:31:31
Vista previa Ivan_25 C++ Builder 13 09-11-2005 10:32:50
Vista integrada silviodp Varios 0 13-10-2004 17:17:10
Vista previa abu Varios 7 17-09-2003 16:08:20


La franja horaria es GMT +2. Ahora son las 17:27:10.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi