Question

ShlObj.pas line 9922 (as in Delphi XE):

type
  BFFCALLBACK = function(Wnd: HWND; uMsg: UINT; lParam, lpData: LPARAM): Integer stdcall;
  TFNBFFCallBack = type BFFCALLBACK;
  {$EXTERNALSYM BFFCALLBACK}

Answering to David Heffernan's comment here because i think this outlines a relevant background for possible why do you ask this? question. Procedural types for callback routines of Windows API origin are declared as type aliases (you know, canonical API name + "Pascalised" alias, or vice versa sometimes). Examples are Windows.PIMAGE_TLS_CALLBACK, ShlObj.LPFNDFMCALLBACK et cetera. Type declaration shown above is an exception. Thats why i'm asking :-)

Was it helpful?

Solution

It is just a way to force us programmers to use TFNBFFCallBack instead of BFFCALLBACK. If it was an alias we could use either for the browse info structure. On a different platform TFNBFFCallBack could point to something different than BFFCALLBACK.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top