Click to See Complete Forum and Search --> : School me on Dos Devices and Reparse Points


delphieng
September 22nd, 2003, 12:59 PM
Hi all. I'm trying to work some magic remapping drives and such under WinXP/Win2k. What i'm trying to accomplish is this:

1) Create a folder: C:\mnt\D_Drive
2) Map D:\ to C:\mnt\D_Drive

Simple?

What i've tried so far is to use

DefineDosDevice( DDD_RAW_TARGET_PATH, "W:", "\\Device\\HarddiskVolume1\\mnt\\D_Drive");

Which seems to work beautifully. But will not persist between reboots.

Now, after reading up on the issue in MSDN i see i need SetVolumeMountPoint. In order to use this function i need to get a Volume Name. I obtain one using:

GetVolumeNameForVolumeMountPoint( "C:\\mnt\\D_Drive\\", pszMountVolume, MAX_PATH)


And then use pszMountVolume to set the mount point. However, when i attempt to do the above, i get an error return and get error "4390 The file or directory is not a reparse point. ERROR_NOT_A_REPARSE_POINT " from GetLastError()


I tried to follow the instructions for creating reparse points, but it's getting fuzzy. I THINK they asked me to use CreateFile and maybe DeviceIoControl(), but i think i'm lost.

any clues here? (p.s. i might have more questions when this one is resolved)