devxlogo

October 9, 1999

LongPathName – Convert a 8.3 file name to long format

Private Declare Function GetLongPathName Lib “kernel32” Alias _ “GetLongPathNameA” (ByVal lpszShortPath As String, _ ByVal lpszLongPath As String, ByVal cchBuffer As Long) As LongConst MAX_PATH = 260′ Convert a short

The number of days in a month

You need just one-line function to evaluate the number of days in a month (while taking leap years into account, of course). The trick is to use the DateDiff and

ShortPathName – Convert a long file name to 8.3 format

Private Declare Function GetShortPathName Lib “kernel32” Alias _ “GetShortPathNameA” (ByVal lpszLongPath As String, _ ByVal lpszShortPath As String, ByVal cchBuffer As Long) As LongConst MAX_PATH = 260′ Convert a long