Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Win API / May 2008



Tip: Looking for answers? Try searching our database.

API to return a folder's type: <SYMLINKD> or <JUNCTION>

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PeterD - 17 May 2008 00:27 GMT
Anyone know of an api that will return whether a folder is a true
folder or is actually a symbolic link/junction?

Perhaps an API that returns folder properties?
PeterD - 17 May 2008 02:00 GMT
>Anyone know of an api that will return whether a folder is a true
>folder or is actually a symbolic link/junction?
>
>Perhaps an API that returns folder properties?

To answer my own question, this works just fine:

======

Sub Command_Click()

Const FILE_ATTRIBUTE_READONLY = &H1&
Const FILE_ATTRIBUTE_HIDDEN = &H2&
Const FILE_ATTRIBUTE_SYSTEM = &H4&
Const FILE_ATTRIBUTE_DIRECTORY = &H10&
Const FILE_ATTRIBUTE_ARCHIVE = &H20&
Const FILE_ATTRIBUTE_ENCRYPTED = &H40&
Const FILE_ATTRIBUTE_NORMAL = &H80&
Const FILE_ATTRIBUTE_TEMPORARY = &H100&
Const FILE_ATTRIBUTE_SPARSE_FILE = &H200&
Const FILE_ATTRIBUTE_REPARSE_POINT = &H400&
Const FILE_ATTRIBUTE_COMPRESSED = &H800&
Const FILE_ATTRIBUTE_OFFLINE = &H1000&
Const FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = &H2000&
   
Dim x As Long

  x = GetAttr(Text.Text)
 
  If (x And FILE_ATTRIBUTE_REPARSE_POINT) = _
     FILE_ATTRIBUTE_REPARSE_POINT Then

     Debug.Print "FILE_ATTRIBUTE_REPARSE_POINT"
  End If
End Sub

======

Note: FILE_ATTRIBUTE_REPARSE_POINT is either a <SYMLINKD> or
<JUNCTION> object. (Probably also a <SYMLINK> too.)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.