Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Delphi para la web
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #4  
Antiguo 07-01-2021
Punzo Punzo is offline
Miembro
 
Registrado: abr 2006
Posts: 97
Poder: 19
Punzo Va por buen camino
Este es el código de mi .dll
Código Delphi [-]
library ConfiguraciónPDVDLL;

{ Important note about DLL memory management: ShareMem must be the
  first unit in your library's USES clause AND your project's (select
  Project-View Source) USES clause if your DLL exports any procedures or
  functions that pass strings as parameters or function results. This
  applies to all strings passed to and from your DLL--even those that
  are nested in records and classes. ShareMem is the interface unit to
  the BORLNDMM.DLL shared memory manager, which must be deployed along
  with your DLL. To avoid using BORLNDMM.DLL, pass string information
  using PChar or ShortString parameters. }

uses
  System.SysUtils,
  System.Classes,
  VCL.Forms,
  Windows,
  IdTCPClient,
  Dialogs,
  UConfiguracion in 'UConfiguracion.pas' {fmConfiguracion},
  UdmConexion in 'UdmConexion.pas' {dmConexion: TDataModule},
  UFamilia in '..\..\UnitsCompartidas\UFamilia.pas',
  JsonDataObjects in '..\..\UnitsCompartidas\JsonDataObjects.pas',
  uErrorDescrip in '..\..\UnitsCompartidas\uErrorDescrip.pas';

var
  DLLApp :TApplication;

{$R *.res}

procedure Crear(ParentApp :TApplication; var ClienCon :TIdTCPClient; IDClien :String); stdcall;
begin
  Application := ParentApp;
  //ShowMessage({'IDCliente param DLL: ' + IDCliente +} ' Port: ' + IntToStr(ClienCon.Port));
  fmConfiguracion := TfmConfiguracion.Create(nil);
  fmConfiguracion.Show;
  fmConfiguracion.ClienConLocal := ClienCon;
  IDCliente := IDClien;
  if Not(fmConfiguracion.ClienConLocal.Connected) then
    fmConfiguracion.ClienConLocal.Connect;
end;

procedure DLLUnload(Reason: Integer); register;
begin
  if Reason = DLL_PROCESS_DETACH then
    Application := DLLApp;
end;

exports
  Crear;

begin
  isMultiThread := True;
  DLLApp := Application;
  DLLProc := @DLLUnload;
end.
Responder Con Cita
 



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
Componente Indy tidsnmp Er0s Internet 2 07-06-2018 10:04:30
Componente Indy TCPClient cmfab Varios 1 16-06-2014 14:29:05
Error con componente Indy Alexander Varios 1 04-07-2006 06:15:07
Componente Indy comba Internet 2 22-06-2005 16:00:24
Componente Indy FTPServer bochi Internet 5 19-12-2003 16:39:10


La franja horaria es GMT +2. Ahora son las 21:51:47.


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