-
斑马条码打印机打印汉字的DLL(Fnthex32.dll)下载
资源介绍
直接将文档解压缩后复制到system32文件夹中即可
为实现斑马打印机对汉字的打印,需调用Fnthex32.dll的函数GETFONTHEX()对汉字进行转换,
C申明:
function int GETFONTHEX(string outstr,string fontname, int orient,int height,int width,int bold,int ITalic,ref string hexbuf) library "fnthex32.dll"
函数调用:
integer int_filenum string named,cBuf GETFONTHEX("条码测试", "宋体", "chnstr01", 0, 50, 0, 1, 0, cBuf)
//测试汉字转换是否成功//
named='test.txt'
int_filenum=FileOpen(named,StreamMode!,write!,Lockwrite!,Append!)
filewrITe(int_filenum,cBuf)
fileclose(int_filenum)
VB中申明:
Private Declare Function GETFONTHEX Lib "fnthex32.dll" (ByVal chnstr$, ByVal fontname$, ByVal chnname$, ByVal orient%, ByVal height%, ByVal width%,ByVal bold%, ByVal italic%, ByVal hexbuf$) As Integer
调用:
nCount = GETFONTHEX("条码测试", "宋体", "chnstr02", 0, 50, 0, 1, 0, cBuf)