add ScanDestinations into ScanAvailableEvent in WSDAPI

Congratulation ! You find the right way to solve this problem!

 

step 1: regenerated .h .cpp .idl file according to http://blogs.msdn.com/b/dandris/archive/2008/06/30/help-how-do-i-send-data-in-my-ws-eventing-subscribe-message.aspx

 

step2: Create ScanDestinations xml block according to http://blogs.msdn.com/b/dandris/archive/2009/08/11/building-wsdxml-sections.aspx

 

step3: modify your   m_pScannerProxy->SubscribeToScanAvailableEvent(m_pNotifyScanner,NULL,NULL); to 

m_pScannerProxy->SubscribeToScanAvailableEvent(m_pNotifyScanner,pScanDestinationsElement,&bodyOut);

 

step4: The following elements are not found in "ScannerServiceTypeTypes.cpp"(auto 

generated code by "WSDCODEGEN.EXE" from "WSDScannerService.wsdl").
- { &Namespace_Scan, L"ScanDestination" }
- { &Namespace_Scan, L"ClientDisplayName" }
- { &Namespace_Scan, L"DestinationResponse" }
Added to "ScannerServiceTypeTypes.cpp".

 

step 5: because we added 3 items into Namespace_Scan in step 4, so the length of Namespace_Scan grow from 409 to 412, so modify the 409 to 412 in your releted files.

 

 

Reference:

http://www.geekpedia.com/Thread44965_WS-Eventing-For-WSD-Scan.html

http://blogs.msdn.com/b/dandris/

 

Date Posted : March 31, 2012

Original blog Posted : http://blog.csdn.net/lcl_data/article/details/7416390

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值