using System;
using System.Text;
using System.Runtime.InteropServices;
class MainClass
{
[DllImport("kernel32", SetLastError = true)]
public static extern int GetCurrentDirectory(int a, StringBuilder b);
static void Main()
{
StringBuilder sb = new StringBuilder();
sb.Length = 250;
GetCurrentDirectory(250, sb);
Console.WriteLine(sb);
}
}
|