c#并口操作 INPOUT32.DLL
c#对并口的读写操作! INPOUT32.DLL 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 IED_Application { public partial class IED : Form { //int led=0x278; [DllImport("inpout32.dll", EntryPoint = "Out32")] public static extern void Output(int adress, int value); [DllImport("user32.dll", EntryPoint = "MessageBoxA")] public static extern void MsgBox(int hWnd, string msg, string caption, int type); public IED() { InitializeComponent(); } private void IED_Load(object sender, EventArgs e) { } private void output_Click(object sender, EventArgs e) { MsgBox(0, "这里是用DllImport", "tiaozhanbei", 0x30); IED.Output(888, 253); } } }
- 1
- 粉丝: 0
- 资源: 4
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
- 1
- 2
- 3
前往页