寻人启示!

hacoolna 2003-11-04 10:13:02
寻找 做过富士通cx-400数码打印机 项目的朋友

关于TA_SendImageAndPrint的问题。



帮忙顶的朋友有分
...全文
49 25 打赏 收藏 转发到动态 举报
写回复
用AI写文章
25 条回复
切换为时间正序
请发表友善的回复…
发表回复
hacoolna 2003-11-07
  • 打赏
  • 举报
回复
代码不常,关于函数说明的文档比较长

现在的错误是调用回调函数时,报告超时!

谁知道这个问题怎么解决?
taosihai1only 2003-11-06
  • 打赏
  • 举报
回复
关注!!
leizzz 2003-11-06
  • 打赏
  • 举报
回复
第一眼:这么长的代码,
第二眼:这么多的up.
晕了.
jackclh 2003-11-06
  • 打赏
  • 举报
回复
不知道...
But I sustain you!
Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP ......
hacoolna 2003-11-06
  • 打赏
  • 举报
回复
to yunfeng007(一水寒):这样不行

Even if NULL is set to pCallbackProc, print process is monitored inside the SDK.
我把pCallbackProc设为NULL。结果还是报告参数错误!

应该是HANDLE hDib这个参数错了,
DIB handle which is set to hDib needs to be a pointer to BITMAPINFOHEADER.

BITMAPINFOHEADER只定义了位图信息,没有数据啊,图片怎么发送到打印机?

那位大侠知道?
hacoolna 2003-11-06
  • 打赏
  • 举报
回复
我的第一篇回复达到20人的帖子,感动ing

谢谢
lwm1977 2003-11-06
  • 打赏
  • 举报
回复
我还以为是找我的
高兴了半天
Boris1981 2003-11-06
  • 打赏
  • 举报
回复
Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP Up Up Up Up Up Up Up UP
yunfeng007 2003-11-05
  • 打赏
  • 举报
回复
你这样试一下
Public Declare Function CallbackProc Lib "XX.dll" (ByVal hPrinter As Long, ByRef pPrintingInfo As TA_PRINTINGINFO, ByVal dwErrorInfo As Long) As Long
其中的xx.dll为你要调用的动态连接库
然后
dwRet = TTA_SendImageAndPrint(phPrinter, hdcDest, AddressOf CallbackProc)
yunfeng007 2003-11-05
  • 打赏
  • 举报
回复
你这样试一下
Public Declare Function CallbackProc Lib "XX.dll" (ByVal hPrinter As Long, ByRef pPrintingInfo As TA_PRINTINGINFO, ByVal dwErrorInfo As Long) As Long
其中的xx.dll为你要调用的动态连接库
然后
dwRet = TTA_SendImageAndPrint(phPrinter, hdcDest, AddressOf CallbackProc)
zjn12 2003-11-05
  • 打赏
  • 举报
回复
给分就要。帮你顶
hacoolna 2003-11-05
  • 打赏
  • 举报
回复
有看了写资料,总觉得回调函数 CallbackProc的函数体中应该有语句

可是它的资料上没有提及,

谢谢诸位朋友帮忙
zlpanzy 2003-11-05
  • 打赏
  • 举报
回复
up
Gelim 2003-11-05
  • 打赏
  • 举报
回复
先下下来看看!
hacoolna 2003-11-04
  • 打赏
  • 举报
回复
自己顶一下
bbgbianbaogui 2003-11-04
  • 打赏
  • 举报
回复
up
snowolf_ren 2003-11-04
  • 打赏
  • 举报
回复
gz
up
itlive 2003-11-04
  • 打赏
  • 举报
回复
没做过帮你UP
hacoolna 2003-11-04
  • 打赏
  • 举报
回复
我是这么写的

Dim Dib As BITMAPINFOHEADER
Dib.biSize = Len(Dib)
Dib.biWidth = Picture1.Image.Width \ 15
Dib.biHeight = Picture1.Image.Height \ 15
Dib.biBitCount = 24
Dib.biPlanes = 1
Dib.biCompression = 0

Dim hdcDest As Long

hdcDest = VarPtr(Dib)

dwRet = TTA_SendImageAndPrint(phPrinter, hdcDest, AddressOf CallbackProc)

Public Function CallbackProc(ByVal hPrinter As Long, ByRef pPrintingInfo As TA_PRINTINGINFO, ByVal dwErrorInfo As Long)

End Function

调用的时候总是告诉我 调用的参数不正确
hacoolna 2003-11-04
  • 打赏
  • 举报
回复
pCallbackProc (IN) Address of callback function

CallbackProc

--------------------------------------------------------------------------------
[Format] void CallbackProc(
HANDLE hPrinter,
PTA_PRINTINGINFO pPrintingInfo,
DWORD dwErrorInfo )
[Overview] This callback function is registered by the application when TA_SendImageAndPrint() function and TA_SendImage() function is called.
And this callback function is called from the thread for image data sending and print process monitoring which the SDK has started.
[Parameters] hPrinter (IN) Printer handle
pPrintingInfo (IN) Information about print progress
dwErrorInfo (IN) Information about error
TA_OK : Printing with no problem
Other : Information about error which is occured
(Same format as return value of the SDK function.)


[Return value] None
[Explanation] The application can manage print status by getting printer status and print progress.
When an error has occurred, error information is set to dwErrorInfo.
Callback function is called in situations described below.
Value of pPrintingInfo is also described.
(bDetailStatus, wPrintedNumber, wPrintRequestNumber is the member of TA_PRINTINGINFO structure)


While SDK function is sending image data : After each unit (128K byte) of the image data is sent to the printer bDetailStatus : Now sending the image data(TA_PRINTERSTATUS_SENDING)
wPrintedNumber : Image data sending rate (displayed in percentage. When image data sending has been completed : TA_SENDIMAGE_COMPLETE)
wPrintRequestNumber : 0
dwErrorInfo : TA_OK


From a printing start to an end bDetailStatus : Now printing (TA_PRINTERSTATUS_PRINTING)
wPrintedNumber : Number of copies already printed
wPrintRequestNumber : Number of requested copies
dwErrorInfo : TA_OK


When an error has occurred bDetailStatus : Status at that time : "Now sending the image data" or "Now printing"
wPrintedNumber : Image data sending rate (displayed in percentage) or number of copies already printed
wPrintRequestNumber : 0 or number of requested copies
dwErrorInfo : Information about error


Value of pPrintingInfo is effective only within this callback function.
Therefore, if the application need to refer to these values, it is necessary to copy these values to the variables in the application.

The type definition as a pointer of this function is PTA_CALLBACK.
加载更多回复(5)

7,771

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧