Announcement

Collapse
No announcement yet.

Long file name issue (Easy issue)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Long file name issue (Easy issue)

    I Just woke up so forgive me if this is babble..

    Just curious why this function/API call returns a short file name under Win2k.
    No big deal, it works, just curious more than anything.
    It returns something like
    C:\DOCUME~1\TNGBBS~1.TNG\LOCALS~1\Temp\

    Where as it would normally be something like:
    C:\Documents and Settings\Tngbbs.tng\local settings\temp

    Code:
    Function GetWindowsTempDir()Export As String
    'SPT 1/22/01
    Local lResult As Long
    Local buff As Asciiz * 255
    lResult = GetTempPath(ByVal SizeOf(buff), Buff)
    Function = Trim$(buff)
    End Function
    ------------------
    Scott
    mailto:[email protected][email protected]</A>
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

  • #2
    Hm, it primarily grabs this path from the TMP ot TEMP environment
    variable in.. yes, from where in Windows2000? Should be Autoexec.bat
    in older systems, but.. The registry? That is probably where the
    short name "error" is, since the call in itself doesn't check any
    paths.


    ------------------

    Comment

    Working...
    X