Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #7  
Antiguo 11-07-2003
__cadetill __cadetill is offline
Miembro
 
Registrado: may 2003
Posts: 3.387
Poder: 27
__cadetill Va por buen camino
por ejemplo, una llamada completa a una dll

**** programa principal (o llamador)
Código:
unit tal;
interface
uses ....
type ....
end; //del type

Const
     MyDll = 'MyDll.dll';
var
  MyFunctionInDll : function ( hWnd : THandle;....): Integer stdcall;

implemantation

uses.....

procedure TMyForm.Button1Click(Sender: TObject);
var Handle: THandle;
begin
     Handle := LoadLibrary(MyDll);
      if Handle <> 0 then
       begin
         @MyFunctionInDll  := GetProcAddress(Handle, 'MyFunctionInDll');
         try
           if @MyFunctionInDll <> nil then
           begin
                MyFunctionInDll ( Self.Handle, .....);
           end;
         finally
                FreeLibrary(Handle);
         end;
       end; //  Fin del IF del Han
end;
******* La dll

Código:
library MyDll;

uses
.....

function MyFunctionInDll ( hWnd : THandle; .....) : integer; stdcall; export;
var iValRet: Integer;
begin
     Application.Handle := hWnd;
     MyFormInDll := TMyFormInDll.Create(Application);
     try
        iValRet := MyFormInDll.ShowModal;
     finally
            FreeAndNil(MyFormInDll);
     end;

     Result := iValRet;
end;

exports MyFunctionInDll;

begin
end.
Espero que ahora lo tengas algo mas claro
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


La franja horaria es GMT +2. Ahora son las 12:00:41.


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