You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to launch a dynamically created demoEid form (from samples) from another form, like this:
procedure TForm1.Button1Click(Sender: TObject);
var
feid: TForm;
begin
feid := tfrmMain.Create(self);
try
feid.ShowModal;
finally
feid.Free;
end;
end;
Doing so, the reader callback of frmMain is called but not working.
procedure HandleReaderCallBack(var ReaderNumber : DWORD; var EventType : DWORD; UserContext : Pointer); stdcall;
begin
if Assigned(frmMain) then
begin
case EventType of
1 : begin
frmMain.Events.Items.Add(DateTimeToStr(Now) + ' card inserted');
ActivateCardEx(ReaderNumber);
frmMain.btnReadCard.Enabled := true;
frmMain.ReadIDCard;
end;
2 : begin
frmMain.Events.Items.Add(DateTimeToStr(Now) + ' card removed');
DeactivateCardEx(ReaderNumber);
frmMain.btnReadCard.Enabled := false;
frmMain.ClearIDData;
end;
3: begin
frmMain.Events.Items.Add(DateTimeToStr(Now) + ' readers list changed');
frmMain.btnReadCard.Enabled := false;
SetCallback(HandleReaderCallBack, nil);
end;
end;
end;
end;
Assigned(frmMain) is false but even if I bypass this test, ActivatedCardEx doesn't work either.
Probably more a Delphi callback problem than a swelio, but can anyone help me on this ?
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to launch a dynamically created demoEid form (from samples) from another form, like this:
Doing so, the reader callback of frmMain is called but not working.
Assigned(frmMain) is false but even if I bypass this test, ActivatedCardEx doesn't work either.
Probably more a Delphi callback problem than a swelio, but can anyone help me on this ?
Thanks
The text was updated successfully, but these errors were encountered: