Recent

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

blaise

  • Newbie
  • Posts: 1
TCustomConnection.DoLoginPrompt/TLoginEvent
« on: December 30, 2017, 03:19:43 pm »
Hi,

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?

 

TinyPortal © 2005-2018