* * *

Author Topic: TCustomConnection.DoLoginPrompt/TLoginEvent  (Read 568 times)


  • Newbie
  • Posts: 1
« on: December 30, 2017, 03:19:43 pm »

In fpc 3.0.2's fcl, TCustomConnection.DoLoginPrompt conditionally fires the OnLogin event. However, TLoginEvent's arguments Username and Password are passed by-value, not by-reference (var). As a result, they are unsuitable for returning values. Nonetheless, TCustomConnection.DoLoginPrompt does use these values for further processing - and bluntly fails to connect as the values set by the event handler never arrive in TCustomConnection.DoLoginPrompt.

To me, TLoginEvent's declaration looks bogus, especially when comparing with LoginDialogExProc's declaration. On the other hand, I do not assume it would remain undiscovered until I eventually run into it.

So, my question is: what am I missing here? Or is this actually something that needs to be fixed?



Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus