|
|
|
Click here to copy the following block | Private Declare Function GetTempFileName Lib "Kernel32" Alias _ "GetTempFileNameA" (ByVal lpszPath As String, _ ByVal lpPrefixString As String, ByVal wUnique As Long, _ ByVal lpTempFileName As String) As Long Private Declare Function GetTempPath Lib "Kernel32" Alias "GetTempPathA" (ByVal _ nBufferLength As Long, ByVal lpBuffer As String) As Long
Public Function GetTempFile(Optional Prefix As String) As String Dim TempFile As String Dim TempPath As String Const MAX_PATH = 260 TempPath = Space$(MAX_PATH) GetTempPath Len(TempPath), TempPath TempPath = Left$(TempPath, InStr(TempPath & vbNullChar, vbNullChar) - 1) TempFile = Space$(MAX_PATH) GetTempFileName TempPath, Prefix, 0, TempFile GetTempFile = Left$(TempFile, InStr(TempFile & vbNullChar, vbNullChar) - 1)
End Function |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|