Implementing GetTempPath 
Author Message
 Implementing GetTempPath

I want to write to a temporary file, which can survive from one session to
another. I don't want to hard code the file path as this program must work
on multiple computers with a variety of operating systems.
I see there is a function called GetTempPath, however, I have not  been able
to get it to work. I am developing an addin for Outlook using VB6.
Is there any reference I can lookup on-line?


Sat, 23 Oct 2004 21:35:24 GMT  
 Implementing GetTempPath
'declare this

Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA"
(ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long

Dim strTemp As String

strTemp = String(100, Chr$(0))
GetTempPath 100, strTemp
strTemp = Left$(strTemp, InStr(strTemp, Chr$(0)) - 1)



Sat, 23 Oct 2004 21:04:44 GMT  
 Implementing GetTempPath
Thank you very much. It worked first shot.


Sat, 23 Oct 2004 23:18:34 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to GetTempPath?

2. GetTempPath

3. GetTempPath Function

4. GetTempPath Windows API not working

5. GetTempPath

6. GetTempPath

7. GetTempPath

8. API32 - GetTempPath

9. GetTempPath

10. why must I implement ICollection and IEnumerable whenever I want to implement IList

11. Implements keyword failing *sometimes*

12. Implementing IUnknown interface in Access 2000 class

 

 
Powered by phpBB® Forum Software