当调用IBidiRequest Bidi接口错误代码13的GetOutputData()时。 [英] When call GetOutputData() of IBidiRequest Bidi interface error code 13 happened.
问题描述
我尝试通过Windows Vista中的Bidi界面获取打印机状态。
我的设置:OS-Vista RC1; Printer-HP 4650 on 10.16.110.89;打印机驱动程序-HP 4650 Color LaserJet PCL5c
我的程序:
在我的代码中:
1)调用IBidiSpl的BindDevice() - 成功。
2)调用IBidiRequest的SetSchema() - 成功。
3)调用IBidiRequest的SendRecv() - 成功。
4)调用IBidiRequest的GetOutputData() - 失败。
注意:GetOutputData()的错误代码为13(数据无效) )。我确信打印机连接良好,可以正常工作。
我根据 http://msdn2.microsoft.com/en-gb/library/ms535684.aspx
I try to get the printer status through Bidi interfaces in Windows Vista.
My settings: OS-Vista RC1; Printer-HP 4650 on 10.16.110.89; Printer driver-HP 4650 Color LaserJet PCL5c
My procedure:
In my code:
1) Call BindDevice() of IBidiSpl -- Successfully.
2) Call SetSchema() of IBidiRequest -- Successfully.
3) Call SendRecv() of IBidiRequest -- Successfully.
4) Call GetOutputData() of IBidiRequest -- Failed.
Notes: the error code of GetOutputData() is 13 (The data is invalid).
I am sure that the printer is connected well and could work well.
I wrote the code based on the sample on http://msdn2.microsoft.com/en-gb/library/ms535684.aspx
有谁能就这个问题给我一些建议?
谢谢。
Can anyone give me some advice on this issue?
Thanks.
推荐答案
如果没有可用的输出数据,您将收到此错误(可能是这种情况,如果设备处于脱机状态,则请求的架构不支持ed或任何其他错误导致请求失败)。调用SendRecv方法后,如果BIDI查询成功,则可以使用GetResult方法
来验证。如果GetResult-method的输出参数的值为零,则仅调用GetOutputData方法。
You´ll get this error, if no output data is available (this might be the case, if the device is offline, the requested schema is not supported, or any other error caused a request failure). After calling the SendRecv-method, you can use the GetResult-method to verify, if the BIDI query either was successful, or not. Call the GetOutputData-method only, if the value of the GetResult-method´s output parameter is zero.
这篇关于当调用IBidiRequest Bidi接口错误代码13的GetOutputData()时。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!