dos.pp GetLongName and GetShortName for mswindows

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

dos.pp GetLongName and GetShortName for mswindows

Dale Welch
file  rtl/win/dos.pp

typo / problem in function GetLongName and GetShortName
it has
   if ret = 0 then
it should be
  if ret <> 0 then
then it will work correctly. :-)

because the ret value is 0 if invalid file / directory passed.
ret is > then the passed bufferlen "255" if it needs a larger buffer to store it in
or it is between 1 and 255 if a valid value.

same error with GetShortName

reference
  http://windowssdk.msdn.microsoft.com/en-us/library/ms685896.aspx
  http://windowssdk.msdn.microsoft.com/en-us/library/ms685885.aspx

--- dale
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal