24小时接单的黑客网站

破解教程,破解软件,破解补丁,破解密码,破解软件下

pinout破解(pinout破解版无限时间ios)

本文目录一览:

如何应用.dll文件破解虚拟串口

网上搜索一番,主要有VSPM和VSPD,前者是在WIN7前使用稳定,后者在WIN7中使用稳定。我的电脑是WIN7_64的,所以选用了VSPD7。于是下了个VSPD7.1的安装包,安装完成后,利用软件界面就可以创建相应的虚拟COM口了。具体如何使用,可以参看这篇文章《虚拟串口VSPD的使用方法》。记住一点,VSPD的COM通信是成对的,一个用于接收数据,一个用于发送数据。

有了虚拟COM口后,就是写一个DEMO进行测试。具体可以参看这篇文件章《win7系统下用vspd软件进行串口编程实例》。

当虚拟COM口可以实现通讯之后,就想着我们的程序是依赖于这个VSPD安装包的,那如果我们是否可以不依赖呢?有两种方案:

方案一:自己写一个虚拟COM的驱动,然后里面实现。有兴趣的可以参看该文《开发虚拟串口驱动程序》。

方案二:VSPD安装包是一个安装程序,为了实现虚拟COM,必然会有相应的驱动。如果我们能够找到这个驱动并安装,之后用相应的接口来调用,或是可行。

方案一想了,但自认还没有这个能耐,于是果断放弃,退而选方案二。那么方案二要实现,首先要解决的问题是接口的调用,因为驱动程序即使不能做到自己安装,但还是可以通过VSPD安装包的安装来解决,那么VSPD中有没有提供这样的接口呢?

查看VSPD的用户手册(User Manual),里面果然有相应的接口(在Using serial port driver in your program下的Functions中),于是有C#写了相应的调用,下面是代码。

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

//Add

using System.Runtime.InteropServices;

namespace Anser.U2Simulator.Model

{

public class VSPD

{

//[DllImport("VSPDCTL.dll", EntryPoint = "CreatePair", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto)]

//public static extern bool CreatePair(byte[] comName1, byte[] comName2);

/// summary

/// CreatePair creates a pair of virtual serial ports with given names.

/// It accepts two null-terminated strings determining which ports should be created as input.

/// For example, "COM5" and "COM6".

/// /summary

/// param name="comName1"A null-terminated string that defines the name of the first port in a pair/param

/// param name="comName2"A null-terminated string that defines the name of the second port in a pair/param

/// returnsCreatePair returns TRUE if virtual serial pair was created successfully and FALSE otherwise/returns

[DllImport("vspdctl.dll")]

public static extern bool CreatePair(string comName1, string comName2);

/// summary

/// DeletePair deletes a pair of virtual serial ports with a given name.

/// As input it takes name of any virtual serial port in a pair.

/// For example, if you want to remove pair named "COM5"-"COM6",

/// you can pass either "COM5" or "COM6" as argument to DeletePair function.

/// /summary

/// param name="comName" A null-terminated string that defines one of the two port names in a pair you want to delete /param

/// returnsDeletePair returns TRUE if virtual serial pair was successfully deleted and FALSE otherwise/returns

[DllImport("vspdctl.dll")]

public static extern bool DeletePair(string comName);

/// summary

/// DeleteAll deletes all virtual serial ports currently present in a system. It accepts no arguments at input.

/// /summary

/// returnsDeleteAll returns TRUE if all virtual serial pairs were successfully deleted and FALSE otherwise/returns

[DllImport("vspdctl.dll")]

public static extern bool DeleteAll();

[DllImport("vspdctl.dll")]

public static extern bool SetStrictBaudrateName(string comName, bool isStrictBaudrate);

[DllImport("vspdctl.dll")]

public static extern bool SetStrictBaudrateHandle(IntPtr handle, bool isStrictBaudrate);

/// summary

/// SetStrictBaudrate enables/disables full baudrate emulation,

/// needs the name of one of the paired virtual ports and boolean parameter

/// that defines if strict baudrate emulation should be enabled or not.

/// /summary

/// param name="comName"A null-terminated string that defines one of the two port names in a pair /param

/// param name="isStrictBaudrate"A boolean variable which should be TRUE

/// if you want to enable strict baudrate emulation and FALSE if you want to disable it/param

/// returnsSetStrictBaudrate returns TRUE if strict baudrate emulation was successfully enabled and FALSE otherwise/returns

[DllImport("vspdctl.dll")]

public static extern bool SetStrictBaudrate(string comName, bool isStrictBaudrate);

/// summary

/// SetBreak enables/disables line break emulation in virtual serial ports.

/// /summary

/// param name="comName"A null-terminated string that defines one of the two port names in a pair/param

/// param name="isBreak" A boolean variable should be TRUE if you want to emulate connection break and FALSE if you want to re-establish it /param

/// returnsSetBreak returns TRUE if line break emulation was successfully enabled and FALSE otherwise./returns

[DllImport("vspdctl.dll")]

public static extern bool SetBreak(string comName, bool isBreak);

/// summary

/// QueryBus: QueryBus sends request to get complete information from the virtual serial bus installed by VSPD.

/// /summary

/// param name="inBufferPtr"A pointer to VSBUS_QUERY or VSBUS_QUERY_EX structures.

/// If you want to get information about all current virtual serial ports

/// then use VSBUS_QUERY structure

/// and if you want to get extended information

/// about single virtual serial pair then use VSBUS_QUERY_EX structure./param

/// param name="inBufferSize"/param

/// param name="outBufferPtr"/param

/// param name="outBufferSize"A pointer to either PORT_INFORMATION or PORT_INFORMATION_EX structures list.

/// If you have used VSBUS_QUERY than you should get PORT_INFORMATION list

/// and if you used VSBUS_QUERY_EX then you should get PORT_INFORMATION_EX./param

/// returns/returns

[DllImport("vspdctl.dll")]

public static extern bool QueryBus(IntPtr inBufferPtr, long inBufferSize, IntPtr outBufferPtr, long outBufferSize);

/// summary

/// SetWiring sets custom signal lines wiring (pinout).

/// /summary

/// param name="comName"A null-terminated string that defines one of the two port names in a pair /param

/// param name="bufferPtr"A pointer to VSERIAL_WIRING structure /param

/// param name="bufferSize"Size of Buffer parameter in bytes /param

/// returnsSetWiring returns TRUE if signal lines wiring was created successfully and FALSE otherwise/returns

[DllImport("vspdctl.dll")]

public static extern bool SetWiring(string comName, IntPtr bufferPtr, long bufferSize);

/// summary

/// SetAccessList restricts access to created virtual serial ports for various applications.

/// /summary

/// param name="comName" A null-terminated string that defines one of the two port names in a pair /param

/// param name="bufferPtr"A pointer to PROGRAM_ACCESS array /param

/// param name="bufferSize"Size of Buffer parameter in bytes /param

/// returnsSetAccessList returns TRUE if port access list was created successfully and FALSE otherwise/returns

[DllImport("vspdctl.dll")]

public static extern bool SetAccessList(string comName, IntPtr bufferPtr, long bufferSize);

//[StructLayout(LayoutKind.Sequential,CharSet=CharSet.Ansi,Pack=1)]

public struct _VSBUS_QUERY

{

/// summary

/// VSBUS_QUERY structure size

/// /summary

ulong Size;

/// summary

/// Has QUERYTYPE_PORTS = 1 value. Can be extended in the future.

/// /summary

ulong QueryType;

};

private const int MAX_PORTNAME_LEN = 6;

public struct _VSBUS_QUERY_EX

{

/// summary

/// VSBUS_QUERY_EX structure size

/// /summary

ulong Size;

/// summary

/// 1:query all virtual ports.

/// 2:query particular virtual pair

/// 3:query particular virtual pair; name of the application, which created the port, is returned.

/// /summary

ulong QueryType;

/// summary

/// Unicode name of any port in the pair you want to delete.

/// For instance, if "COM6-COM7" virtual serial ports pair was created,

/// then to remove it, PortName's value should be COM6 or COM7.

/// /summary

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_PORTNAME_LEN)]

string PortName;

}

}

}

proteus能仿真8259么?

用ultraedit打开82xx.dll查找8259的ASCII码,再查8255的,看长度像是有定义,Proteus中的825x库里面仅有8259不带A,可以自建一个与8259同样但不同名的原件8259A试试

再看Proteus中分别右键decompose 8255A和8259 再双击其 name

{*DEVICE}

NAME=8255A

{PREFIX=U}

{DATA=pdfs/micro/82c55a.pdf}

{*PROPDEFS}

{PACKAGE="PCB Package",PACKAGE,0}

{PRIMITIVE="Primitive Type",HIDDEN STRING}

{MODDLL="VSM Model DLL",HIDDEN STRING}

{ITFMOD="Interface Model",HIDDEN STRING}

{PORTDHL="Delay High to Low",ADVANCED FLOAT,POZ}

{PORTDLH="Delay Low to High",ADVANCED FLOAT,POZ}

{*INDEX}

{CAT=Microprocessor ICs}

{SUBCAT=Peripherals}

{DESC=Programmable Peripheral Interface with 24 I/O Lines}

{MFR=Intel}

{*COMPONENT}

{PACKAGE=DIL40}

{PRIMITIVE=DIGITAL,8255}

{MODDLL=82XX.DLL}

{ITFMOD=CMOS}

{PORTDHL=20n}

{PORTDLH=20n}

{*DEVICE}

NAME=8259

{PREFIX=U}

{DATA=pdfs/micro/8259a.pdf}

{*PROPDEFS}

{PRIMITIVE="Simulator Primitive",HIDDEN STRING}

{MODDLL="VSM Model",HIDDEN STRING}

{TRACE_GENERAL="General",HIDDEN TRACEMODE}

{TRACE_TIMINGS="Timings",HIDDEN TRACEMODE}

{TRACE_COMMANDS="Commands",HIDDEN TRACEMODE}

{PACKAGE="PCB Package",PACKAGE,2,DIL28,PLCC28}

{*INDEX}

{CAT=Microprocessor ICs}

{SUBCAT=Peripherals}

{MFR=Intel}

{DESC=Programmable Interrupt Controller}

{*COMPONENT}

{PRIMITIVE=DIGITAL}

{MODDLL=82XX.DLL}

{PACKAGE=DIL28}

{TRACE_GENERAL=3}

{TRACE_COMMANDS=3}

{*PINOUT DIL28}

{ELEMENTS=1}

{PIN "$CS$" = 1}

{PIN "$INTA$" = 26}

{PIN "$RD$" = 3}

{PIN "$SP$/$EN$" = 16}

{PIN "$WR$" = 2}

{PIN "A0" = 27}

{PIN "CAS[0..2]" = 12,13,15}

{PIN "D[0..7]" = 11,10,9,8,7,6,5,4}

{PIN "INT" = 17}

{PIN "IR0" = 18}

{PIN "IR1" = 19}

{PIN "IR2" = 20}

{PIN "IR3" = 21}

{PIN "IR4" = 22}

{PIN "IR5" = 23}

{PIN "IR6" = 24}

{PIN "IR7" = 25}

{PP (GND) = 14}

{PP (VCC) = 28}

{COMMON=GND,VCC}

{*PINOUT PLCC28}

{ELEMENTS=1}

{PIN "$CS$" = 1}

{PIN "$INTA$" = 26}

{PIN "$RD$" = 3}

{PIN "$SP$/$EN$" = 16}

{PIN "$WR$" = 2}

{PIN "A0" = 27}

{PIN "CAS[0..2]" = 12,13,15}

{PIN "D[0..7]" = 11,10,9,8,7,6,5,4}

{PIN "INT" = 17}

{PIN "IR0" = 18}

{PIN "IR1" = 19}

{PIN "IR2" = 20}

{PIN "IR3" = 21}

{PIN "IR4" = 22}

{PIN "IR5" = 23}

{PIN "IR6" = 24}

{PIN "IR7" = 25}

{PP (GND) = 14}

{PP (VCC) = 28}

{COMMON=GND,VCC

8255A的是 {PRIMITIVE=DIGITAL,8255}

而8259的是 {PRIMITIVE=DIGITAL}

楼主可以在decompose下对照更改后再封装一下试试

声明:尚未仿真成功

  • 评论列表:
  •  鸢旧笙痞
     发布于 2022-07-03 05:47:51  回复该评论
  • rmation about all current virtual serial ports /// then use VSBUS_QUERY structure /// and if you want to get exte
  •  纵遇白况
     发布于 2022-07-03 14:59:29  回复该评论
  • // returnsDeletePair returns TRUE if virtual serial pair was successfully deleted and FALSE otherwise/returns [DllImp
  •  绿邪寻倌
     发布于 2022-07-03 13:10:43  回复该评论
  • 动程序即使不能做到自己安装,但还是可以通过VSPD安装包的安装来解决,那么VSPD中有没有提供这样的接口呢?查看VSPD的用户手册(User Manual),里面果然有相应的接口(在Using serial port driver in your program下的Functions

发表评论:

Powered By

Copyright Your WebSite.Some Rights Reserved.