求助,C#使用COM口来实现打印汉字[DllImport("Fnthex32.dll ", CharSet = CharSet.Ansi)]public static extern int GETFONTHEX(
                      string chnstr,
                      string fontname,
                      int orient,
                      int height,
                      int width,
                      int bold,
                      int italic,
                      StringBuilder hexbuf); StringBuilder sb = new StringBuilder(255);            int count;
            count = FontHex.GETFONTHEX("测试 ", "宋体", 0, 5, 30, 0, 0, sb);
            if (count > 0)
            {
                Print(sb.ToString() + "^XA\n^FO10,140^XGOUTSTR01,1,2^FS");            }打不出来,请高手指点,万分感谢!

解决方案 »

  1.   

    http://blog.csdn.net/Breze_ralf/archive/2010/03/30/5433106.aspx希望有用!!!
      

  2.   

    试了一下提示:
    未能从程序集“Evo.Utility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”中加载类型“Evo.Utility.Code128.FontHex”,因为方法“GETFONTHEX”没有实现(没有 RVA)。[DllImport("fnthex32.dll")]
    public static extern int GETFONTHEX(
    string BarcodeText,
    string FontName,
    string FileName,  多加了这个是不是不行int Orient,
    int Height,
    int Width,
    int IsBold,
    int IsItalic,
    StringBuilder ReturnBarcodeCMD);
      

  3.   

    http://topic.csdn.net/u/20100329/17/a7abd929-e04f-4639-80e9-9b82865c3369.html我开发是这么用的,开发的项目程序用了一年多了,都没问题!你自己再多多调试一下吧!
      

  4.   

    现在提示:尝试读取或写入受保护的内存。这通常指示其他内存已损坏。我的fnthex32.dll是放在Debug目录下的,这是怎么回事,要如何处理呢
      

  5.   

    开发时fnthex32.dll我是放在BIN目录发布安装至用户的电脑fnthex32.dll我是放在程序的安装目录
      

  6.   

    andy1118请问你有什么联系方式吗能否加我一下QQ:32295132我急着要处理这个问题,非常感谢!
      

  7.   

    会不会是我的:fnthex32.dll这个不是最新的能不能把你那个运行OK的DLL发给我呢我邮箱:[email protected]
      

  8.   

    这个最后解决了没?和你问题一样,我也碰到这个问题,可否发份源码给我
    [email protected] 谢谢