日期:2014-05-17 浏览次数:21058 次
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsFormsApplication1
{
public class XXXX
{
[DllImport("XNHInterface.dll", EntryPoint = "netPing", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern int netPing(ref char a);
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
char b = 'g';
int s = 0;
s=XXXX.netPing(ref b);
label1.Text = s.ToString();
}
}
}