private void btn_Send_Click(object sender, EventArgs e)
{
//byte[] buffer = System.Text.Encoding.Unicode.GetBytes(this.txtbox_SendContent.Text);
int nRet = 0;
nRet = NetMessageBufferSend(null, txtbox_IP.Text, null, txtbox_SendContent.Text, txtbox_SendContent.Text.Length * 2 + 2);
}
[DllImport("Netapi32", CharSet = CharSet.Unicode)]
public static extern int NetMessageBufferSend(
string servername, //服务器名称,为NULL
string fromname, //接收方名称,可为IP或计算机名称
string msgname, //信息名称,为NULL
string buf, //信息
int buflen); //信息长度