Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Using XSLT to transform the file system

From: "Sam Hobbs" <samuel@------.--.---_------_------_--_----->
To: 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





transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent