09-05-2012, 05:44 PM
1. I cannot answer, try to find in google. Also try this:
Macro Macro1820
Google suggestions:
Hard Links and Junctions
Reparse Point Operations
2.
Macro Macro1817
Macro Macro1820
int attr=GetFileAttributesW(@fullPathOfTheFolder); if(attr=-1) end "failed, %s" 0 _s.dllerror
if(attr&FILE_ATTRIBUTE_REPARSE_POINT) out "is junction"Hard Links and Junctions
Reparse Point Operations
2.
Macro Macro1817
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