Buenas:
Soy novatillo, y he estado haciendo unas cosillas el delphi, sobre todo dlls para reutilizar en otros lenguajes, y siempre he usado el Borland Delphy 7.
Me he puesto a hacer unas cosillas, y me he puesto a utilizar el nuevo editor de Delphy el XE3, pero siempre que lanzo un pChar o un String, los caracteres que me muestra estan en chino.
¿Alguien sabe como tengo que configurarlo? No encuentro ninguna documentación al respecto.
¿alguien sabe por qué al generar la dll, me ocupa tanto? He hecho una prueba con una chorrada, y me ocupa casi 2 Megas, lo hago desde Delphy 7, y ademas de funcionar perfectamente, me ocupa 100 Kbs.
Os dejo el codigo pa que veas que chorrada es:
Código PHP:
library Prueba;
{ 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
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs;
{$R *.res}
function mensaje(sTitulo : pChar; sMensaje : pChar): boolean;stdcall;
begin
Application.MessageBox(sMensaje, sTitulo, MB_ICONINFORMATION);
result:=TRUE;
end;
exports mensaje;
begin
end.