|
-
Feb 4th, 2000, 05:21 AM
#1
Thread Starter
Junior Member
Hi, I am trying to find out the windows tempoary directory by using the API function GetTempPath, but all I am getting are a bunch of strenge number and an empty string. Does anyone know how to use that function and if not, is there any other way to solve my problem?
-
Feb 4th, 2000, 05:42 AM
#2
Sure.
Code:
Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
Private Sub Form_Load()
Dim lRet As Long
Dim strBuffer As String
strBuffer = Space(125)
lRet = GetTempPath(Len(strBuffer), strBuffer)
If lRet Then MsgBox "Temp Directory: " & Left(strBuffer, lRet)
End Sub
------------------
Serge
Senior Programmer Analyst
[email protected]
[email protected]
ICQ#: 51055819
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|