资源简介
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);
}
}
}
代码片段和文件信息
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);
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 40171 2008-05-26 14:41 C#并口操作\dll_pic.jpg
文件 73728 2010-11-27 21:57 C#并口操作\IED Application\IED Application\bin\Debug\IED Application.exe
文件 30208 2010-11-27 21:57 C#并口操作\IED Application\IED Application\bin\Debug\IED Application.pdb
文件 14328 2010-12-26 18:23 C#并口操作\IED Application\IED Application\bin\Debug\IED Application.vshost.exe
文件 490 2007-07-21 02:33 C#并口操作\IED Application\IED Application\bin\Debug\IED Application.vshost.exe.manifest
文件 73728 2010-11-27 21:22 C#并口操作\IED Application\IED Application\bin\Release\IED Application.exe
文件 19968 2010-11-27 21:22 C#并口操作\IED Application\IED Application\bin\Release\IED Application.pdb
文件 5473 2010-11-27 13:22 C#并口操作\IED Application\IED Application\IED Application.csproj
文件 533 2010-11-25 22:22 C#并口操作\IED Application\IED Application\IED Application.csproj.user
文件 1009 2010-11-27 21:57 C#并口操作\IED Application\IED Application\IED.cs
文件 2407 2010-11-27 18:57 C#并口操作\IED Application\IED Application\IED.Designer.cs
文件 54200 2010-11-27 18:57 C#并口操作\IED Application\IED Application\IED.resx
文件 27648 2004-01-23 03:47 C#并口操作\IED Application\IED Application\INPOUT32.DLL
文件 32054 2002-01-25 16:11 C#并口操作\IED Application\IED Application\Install.ico
文件 1916 2010-12-26 18:23 C#并口操作\IED Application\IED Application\obj\Debug\IED Application.csproj.FileListAbsolute.txt
文件 845 2010-11-27 18:57 C#并口操作\IED Application\IED Application\obj\Debug\IED Application.csproj.GenerateResource.Cache
文件 73728 2010-11-27 21:57 C#并口操作\IED Application\IED Application\obj\Debug\IED Application.exe
文件 30208 2010-11-27 21:57 C#并口操作\IED Application\IED Application\obj\Debug\IED Application.pdb
文件 32620 2010-11-27 18:57 C#并口操作\IED Application\IED Application\obj\Debug\IED_Application.IED.resources
文件 180 2010-11-27 13:24 C#并口操作\IED Application\IED Application\obj\Debug\IED_Application.Properties.Resources.resources
文件 1948 2010-11-27 21:29 C#并口操作\IED Application\IED Application\obj\Release\IED Application.csproj.FileListAbsolute.txt
文件 845 2010-11-27 19:02 C#并口操作\IED Application\IED Application\obj\Release\IED Application.csproj.GenerateResource.Cache
文件 73728 2010-11-27 21:22 C#并口操作\IED Application\IED Application\obj\Release\IED Application.exe
文件 32620 2010-11-27 19:02 C#并口操作\IED Application\IED Application\obj\Release\IED_Application.IED.resources
文件 180 2010-11-27 13:22 C#并口操作\IED Application\IED Application\obj\Release\IED_Application.Properties.Resources.resources
文件 494 2010-11-25 21:11 C#并口操作\IED Application\IED Application\Program.cs
文件 1380 2010-11-25 21:10 C#并口操作\IED Application\IED Application\Properties\AssemblyInfo.cs
文件 27648 2010-02-18 01:11 C#并口操作\IED Application\IED Application\Properties\inpout32.dll
文件 2880 2010-11-25 21:10 C#并口操作\IED Application\IED Application\Properties\Resources.Designer.cs
文件 5612 2010-11-25 21:10 C#并口操作\IED Application\IED Application\Properties\Resources.resx
............此处省略28个文件信息
相关资源
- C# 调用win32 api函数-user32.dll详细说明
- C# 调用BarTender打印条码DEMO
- 大型比赛竞赛抽签系统 可打印 c# vs
- C#编写的Gerber查看器
- lua C# .Net4.0 vs2010 LuaInterface
- C#十六进制编辑器
- 明华URF-35H读卡器 C#读写源码 为大家
- C#文件流读取CSV文件
- c#读写PDF文件sql
- C# winform Socket大文件传输
- c#车牌识别系统附30张测试图片
- 《C#面向对象程序设计》源代码(CS)
- 金旭亮《C#面向对象程序设计》教案
- 试题库管理系统毕业论文(C#)源程序
- 学校网站原代码(C#.NET)
- C#-数据库操作技术-员工管理系统
- c#web开发入门经典
- C#与Matlab混合编程的几种方式
- c# 开发与 mysql数据库实现的增删改查
- C#异步操作 异步查询数据库 异步处理
- Basler相机通过IO触发源码
- [源代码] 《领域驱动设计 (C# 2008 实
- 松下PLC与C#通讯串口调试入门教程.z
- USB 继电器控制器 LCUS-1 保证能用 c#
- C# AES加密解密小工具
- C#圆形按钮,非常漂亮动态~~
- [精]C#仿QQ右下角弹出提示框()
- C#进程间通信-共享内存代码
- 有史以来最简单的三层(C#)
- vb调用c#编写的串口DLL文件(vb源码
评论
共有 条评论