DLL??
Hej jeg har rodet med denne her artiklehttp://www.udvikleren.dk/vis_artikel.php4?id=47
og gjort som der står men den giver denne error nå jeg compiler
[Error] Project2.dpr(21): Undeclared identifier: 'frmDllForm'
[Error] Project2.dpr(21): Operator not applicable to this operand type
[Error] Project2.dpr(22): Undeclared identifier: 'TfrmDllForm'
her er min DLL kode
library Project2;
{ 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,
dllform in 'dllform.pas' {Form1};
procedure ShowDllForm; stdcall;
begin
if frmDllForm = nil then
frmDllForm := TfrmDllForm.Create(nil);
frmDllForm.Show;
end;
function ShowDllFormModal: integer; stdcall;
begin
if frmDllForm = nil then
frmDllForm := TfrmDllForm.Create(nil);
result := frmDllForm.ShowModal;
end;
procedure TfrmDllForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := caFree;
frmDllForm := nil;
end;
exports
ShowDllForm,
ShowDllFormModal;
{$R *.RES}
begin
end.