Ver Mensaje Individual
  #3  
Antiguo 03-11-2010
cloayza cloayza is offline
Miembro
 
Registrado: may 2003
Ubicación: San Pedro de la Paz, Chile
Posts: 921
Reputación: 23
cloayza Tiene un aura espectacularcloayza Tiene un aura espectacular
Cita:
Empezado por roman Ver Mensaje
En DLLs no puedes usar funciones que usen parámetros string o devuelvan valores string.
Querido Roman, creo que estas en un error.

Código Delphi [-]
library Project1;

{ 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
  SysUtils,
  Classes;

{$R *.res}

begin
end.

Solo hay que hacer lo que indica el comentario e incluir junto con nuestro ejecutable la libreria BORLNDMM.DLL.

Yo prefiero como dices tu usar PChar.
Saludos
Responder Con Cita