Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-07

dos.pp GetLongName and GetShortName for mswindows

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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