Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Using XSLT to transform the file system [Thread Next] Re: Using XSLT to transform the file systemTo: NULL Date: 7/8/2008 9:50:00 PM
If I understand your question, then you can use the Windows API. Try the
following. You will need to read the documentation and determine more
details, but I hope this is enough to get you started.
Private Declare Function SHGetSpecialFolderPath Lib "shell32.dll" Alias
"SHGetSpecialFolderPathA" _
(ByVal hwndOwner As Long, ByVal pszPath As String, ByVal nFolder As
Long, ByVal fCreate As Long) As Long
Private Const CSIDL_PROGRAMS = 2
Private Const CSIDL_PERSONAL = 5
Private Const CSIDL_MYMUSIC = 13
Private Const MAX_PATH = 260
Public Sub Sample()
ShowPath CSIDL_PROGRAMS, "Programs"
ShowPath CSIDL_PERSONAL, "Documents"
ShowPath CSIDL_MYMUSIC, "Music"
End Sub
Private Sub ShowPath(PathID As Long, Title As String)
Dim Buffer As String
Dim rv As Long
Buffer = String$(MAX_PATH, vbNullChar)
rv = SHGetSpecialFolderPath(0, Buffer, PathID, 0)
If rv = 0 Then
MsgBox "Error"
Exit Sub
End If
Buffer = Left(Buffer, InStr(Buffer, vbNullChar))
MsgBox Title & ": " & vbCrLf & Left(Buffer, InStr(Buffer, vbNullChar))
End Sub
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
