Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Folder watch
#4
1. I cannot answer, try to find in google. Also try this:
Macro Macro1820
Code:
Copy      Help
int attr=GetFileAttributesW(@fullPathOfTheFolder); if(attr=-1) end "failed, %s" 0 _s.dllerror
if(attr&FILE_ATTRIBUTE_REPARSE_POINT) out "is junction"
Google suggestions:
Hard Links and Junctions
Reparse Point Operations

2.
Macro Macro1817
Code:
Copy      Help
str driveLetter="C"

__Handle hf=CreateFileW(@F"\\.\{driveLetter}:" 0 0 0 OPEN_EXISTING 0 0); if(hf=-1) end "failed, %s" 0 _s.dllerror ;;note: this just gets handle, not creates a file

STORAGE_DEVICE_NUMBER d
if(!DeviceIoControl(hf IOCTL_STORAGE_GET_DEVICE_NUMBER 0 0 &d sizeof(d) &_i 0)) end "failed, %s" 0 _s.dllerror

str s=F"\Harddisk{d.DeviceNumber}\partition{d.PartitionNumber}"
out s


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)