VB中如何獲取系統臨時目錄

2021-04-15 11:17:04 字數 389 閱讀 3239

private declare function gettemppath lib "kernel32" alias "gettemppatha" (byval nbufferlength as long, byval lpbuffer as string) as long

private function gettmppath() as string

dim tmpbuffer as string

tmpbuffer = string(255, chr(0))

gettemppath 256, tmpbuffer

gettmppath = trim(left(tmpbuffer, instr(1, tmpbuffer, chr(0)) - 1))

end function

如何獲取系統的臨時目錄路徑?

gettemppath取得的是乙個dos名稱,當檔名長度大於8時,長檔名格式 c documents and settingsadministratorlocal settingstemp 會顯示成 c docume 1admini 1locals 1temp 的短檔名格式,如何根據自己需要取得系統...

如何獲取系統的臨時目錄路徑?

gettemppath取得的是乙個dos名稱,當檔名長度大於8時,長檔名格式 c documents and settings administrator local settings temp 會顯示成 c docume 1 admini 1 locals 1 temp 的短檔名格式,如何根據自己...

如何獲取系統的臨時目錄路徑?

gettemppath取得的是乙個dos名稱,當檔名長度大於8時,長檔名格式 c documents and settings administrator local settings temp 會顯示成 c docume 1 admini 1 locals 1 temp 的短檔名格式,如何根據自己...