关于调用Fnthex32.dll实现对汉字的转换的问题
为实现斑马打印机对汉字的打印,需调用Fnthex32.dll的函数GETFONTHEX()对汉字进行转换,但是调用此函数时,系统都异常中断,还请各位帮忙解决!
[相关线索]:
函数声明:/*Global External Functions*/
function int GETFONTHEX(string outstr,string fontname,string outstrname,&
int orient,int height,int width,int bold,int italic,&
ref string hexbuf) library "fnthex32.dll"
函数调用:/*在BUTTON控件中CLICKED事件中添加*/
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)
错误提示:
"Error:Error calling external function %s at ling 4 in cliked event of object cb_1 of w_test"
P.S: 之前使用的PB版本为9.0.0.5507,在网上看到有的网友说是PB的BUG,遂升级至9.0.3.8836也没有得到解决