请问怎样用C#来写调用485的IC读卡器的DLL!!
Declare Function PowerOn Lib "硬件的DLL名" () As Integer //上电函数
Declare Function PowerOff Lib "硬件的DLL名" () As Integer //下电函数
Declare Function OpenComm Lib "硬件的DLL名" (ByVal nPort As Integer) As Integer //打开端口函数
Declare Function CloseComm Lib "硬件的DLL名" () As Integer //关闭端口函数
Declare Function GetState Lib "硬件的DLL名" (ByVal nPort As Integer) As Integer
Declare Function IC_ATR Lib "硬件的DLL名" (ByVal DataBuffer As String) As Integer //卡片复位请求函数
Declare Function IC_ReadMain Lib "硬件的DLL名" (ByVal Offset As Integer, ByVal Length As Integer, ByVal DataBuffer As String) As Integer //'读储主存器的函数
Declare Function IC_ReadProtect Lib "硬件的DLL名" (ByVal DataBuffer As String) As Integer //读保护储存器
Declare Function IC_ReadSecurity Lib "硬件的DLL名" (ByVal DataBuffer As String) As Integer //读保密储存器
Declare Function IC_ReadErrorCount Lib "硬件的DLL名" () As Integer //读错误计数器
Declare Function IC_WriteMain Lib "硬件的DLL名" (ByVal Offset As Integer, ByVal Length As Integer, ByVal DataBuffer As String) As Integer //写主储存器的函数
Declare Function IC_WriteProtect Lib "硬件的DLL名" (ByVal Offset As Integer, ByVal Length As Integer, ByVal DataBuffer As String) As Integer //写保护储存器的函数
Declare Function IC_updateSM Lib "硬件的DLL名" (ByVal Offset As Integer, ByVal Length As Integer, ByVal DataBuffer As String) As Integer
Declare Function IC_ChangePass Lib "硬件的DLL名" (ByVal PassWord As String) As Integer //更改密码函数
Declare Function IC_PSCCheck Lib "硬件的DLL名" (ByVal DataBuffer As String) As Integer //密码校验函数
等等函数,只要想做什么样的功能都可以按这样的模式往下写
我想把上面用VB写的改成C#的!!!!!!1
有人会吗?