Algo asi debería funcionarte (no lo he probado

)
Código Delphi
[-]library CLDRes;
uses
ShareMem, SysUtils,
Classes,
bsSkinData,
Forms,
Controls,
uPassOk in 'FORM\uPassOk.pas' ;
{$R *.res}
function DisplayModalForm(AHandle: THandle; S: String): Boolean; stdcall;
begin
result := False;
Application.Handle := AHandle;
with TwPassOk.Create(Application) do
try
if ShowModal = mrOk then
result := S = pePass.Text;
finally
Free;
end;
end;
exports
DisplayModalForm;
begin
end.
Código Delphi
[-]procedure TwMain.ClickStateChange(Sender: TObject);
const
DLLNAME = 'CLDRes.dll';
var
Passw: Boolean;
DllHandle : THandle;
DlgForm: procedure (H : THandle; S: string); stdcall;
begin
with wDataModule do
if dsUser.State = dsInsert then
if (Sender as TbsSkinButton).Name = 'btAdmPost' then
begin
try
DllHandle := LoadLibrary(DLLNAME);
if DllHandle <>0 then
begin
DlgForm := GetProcAddress(DllHandle,'DisplayModalForm');
Passw := DlgForm(Application.Handle, dsUserPASS.AsString);
ShowMessage(BoolToStr(Passw));
end
else
ShowMessage(Format('Error al cargar %s',[DLLNAME]));
finally
FreeLibrary(DllHandle);
end;
end;
end;