@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The SetVolumeMountPoint API !!!!C# Signature: [DllImport("kernel32.dll")] static extern bool SetVolumeMountPoint(string lpszVolumeMountPoint, string lpszVolumeName); !!!!User-Defined Types: None. !!!!Notes: None. !!!!Tips & Tricks: Please add some! !!!!Sample Code: StringBuilder sb = new StringBuilder(1024); VolumeFunctions.GetVolumeNameForVolumeMountPoint("C:\\", sb, sb.Capacity); richTextBox1.Text = sb.ToString() + "Test"; VolumeFunctions.SetVolumeMountPoint(@"W:\", @"\C:\Test"); richTextBox1.AppendText(Win32Exception(Marshal.GetLastWin32Error()).ToString()); public class VolumeFunctions { [DllImport("kernel32", CharSet = CharSet.Auto, SetLastError = true)] internal static extern bool GetVolumeNameForVolumeMountPoint( string volumeName, StringBuilder uniqueVolumeName, int uniqueNameBufferCapacity); [DllImport("kernel32.dll")] internal static extern bool SetVolumeMountPoint(string lpszVolumeMountPoint, string lpszVolumeName); } !!!!Alternative Managed API: Do you know one? Please contribute it! Documentation: SetVolumeMountPoint@msdn on MSDN
Edit kernel32.SetVolum...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.