コメント |
@DIV
using System.Text;
using System.Runtime.InteropServices;
public class App
{
[ DllImport( "Kernel32.dll", CharSet=CharSet.Auto )]
public static extern int GetComputerName(
StringBuilder strBuffer,
ref int nSize
);
public static void Main() {
StringBuilder strBuffer = new StringBuilder( 512 );
int nSize = 512;
GetComputerName( strBuffer, ref nSize );
System.Console.WriteLine( strBuffer );
}
}
@END
|