[ DllImport ( "kernel32.dll" )]
public static extern uint GetShortPathName( string lpszLongPath ,
StringBuilder lpszShortPath, int cchBuffer);
private void button1_Click( object sender , EventArgs e)
{
StringBuilder vBuffer = new StringBuilder ( 260 );
GetShortPathName( @"C:\Program Files\Common Files\ODBC\Data Sources" ,
vBuffer, vBuffer . Capacity);
Text = vBuffer . ToString();
}