Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The code has an optional implicity-byref parameter and I want to suppress the OptionalArguments migration for this method. The methods is called in the VBP where it is declared and from external VBPs (after SharedFiles)other VBPs in the system.

Code Block
Public Function SearchForWindow(PartTitle$, Optional SwitchTo, Optional WholeTitleFoundOUT) As Long  <-- WholeTitleFoundOUT must remain ByRef

Some calls passed all parameters:

hWndLoc& = SearchForWindow(OrigCaption, False, NameString)

Some calls omit the optional parameters:

hWnd = SearchForWindow(ReaderServerWindowName(iServerNo))
hWnd = SearchForWindow(ReaderServerWindowName(iReaderServerNoIN))
hWnd = SearchForWindow(ReaderServerWindowNameFromReader(iReaderIndexIN))
hWnd = SearchForWindow(SReaderServerWindowNamePrefix())

...