WebHost/POSPrinter/BeiYangOPOS.cs
(开头部分) 27KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.IO.Ports;
namespace POSPrinter //RMSPOS
{
/// <summary>
/// 北洋OPOS指令集二次开发包DLL调用
///
/// 备注:
/// 因为北洋的demo包里没有C#的,所以参考delphi包的代码转成了C#的.
/// 北洋的dll支持市面上所有的 支持ESC/ POS指令的小票打印机的打印(EPSON,佳博,中崎等)
///
/// 如果有任何修改请邮件通知本人,欢迎志同道合的朋友共同交流;
/// coder: 萧远峰 mail: 71008973@qq.com
///
/// POSDLL 动态库的出口函数是用来直接控制 POS 打印机工作的,
/// 分为四个部分:通用函数、标准模式打印函数、页模式打印函数、调试等函数。
/// </summary>
public class BeiYangOPOS
{
const string _DllVer = "1.4";
/// <summary>
/// 获取动态库版本号
/// </summary>
public string GetDllVer
{
get { return _DllVer;}
}
/// <summary>
/// 设备打开后的句柄
/// </summary>
public IntPtr POS_IntPtr;
/// <summary>
/// 函数返回值
/// </summary>
public uint POS_SUCCESS = 1001;// 函数执行成功
public uint POS_FAIL = 1002; // 函数执行失败
public uint POS_ERROR_INVALID_HANDLE = 1101; // 端口或文件的句柄无效
public uint POS_ERROR_INVALID_PARAMETER = 1102;// 参数无效
public uint POS_ERROR_NOT_BITMAP = 1103 ; // 不是位图格式的文件
public uint POS_ERROR_NOT_MONO_BITMAP = 1104;// 位图不是单色的
public uint POS_ERROR_BEYONG_AREA = 1105 ;//位图超出打印机可以处理的大小
public uint POS_ERROR_INVALID_PATH = 1106; // 没有找到指定的文件路径或名
/// <summary>
/// 停止位
/// </summary>
public uint POS_COM_ONESTOPBIT = 0x00;//停止位为1
public uint POS_COM_ONE5STOPBITS = 0x01;//停止位为1.5
public uint POS_COM_TWOSTOPBITS = 0x02;//停止位为2
/// <summary>
/// 奇偶校验
/// </summary>
public uint POS_COM_NOPARITY = 0x00;//无校验
后面还有 460 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
