This topic contains a list of the constants that are used for WIA IStream-based transfers.
這些常數分為三個子組:
Item type
Callback messages
Transfer flags
Item type
下表顯示哪些 WIA 專案類型位與資料流程型數據傳輸相關。
| Name | Description |
|---|---|
| WiaItemTypeTransfer | This WIA_IPA_ITEM_FLAGS bit should be set on all items that are capable of transferring data; that is, an application can initiate a download or upload on items that have this bit set. |
Callback messages
The following table shows possible values for the lFlags parameter of IWiaTransferCallback::TransferCallback.
| Name | Description |
|---|---|
| WIA_TRANSFER_MSG_STATUS | 通知應用程式轉移進度。 pWiaTransferParams->lPercentComplete contains the percent complete for this item and the page that is being transferred. |
| WIA_TRANSFER_MSG_END_OF_STREAM | 通知應用程式沒有更多資料要傳輸至目前的資料流,而且資料流程可能會關閉。 隨後可以在多項目或多頁傳輸中請求新的流。 驅動程式不會手動傳送此訊息。 當驅動程式要求下一個資料流程時,WIA 服務會自動傳送此訊息。 |
| WIA_TRANSFER_MSG_END_OF_TRANSFER | 在轉移結束時由應用程序收到。 驅動程式不會傳送此訊息。 The WIA service will send this message automatically after the transfer has ended (that is, the call to IWiaMiniDrv::drvAcquireItemData returns). |
| WIA_TRANSFER_MSG_ERROR | 由 Microsoft 保留以供將來使用。 |
| WIA_TRANSFER_MSG_DEVICE_STATUS | 表示傳輸期間發生錯誤(例如,夾紙)。 pWiaTransferParams->hrErrorStatus contains the error status code. |
| WIA_TRANSFER_MSG_NEW_PAGE | 表示在使用支援一個檔案中多個頁面的格式 (例如多檔案 TIFF) 時,在多頁傳輸期間正在傳輸新頁面。 |
Transfer flags
The following table shows the flags that may be passed into IWiaMiniDrv::drvAcquireItemData.
| Name | Description |
|---|---|
| WIA_MINIDRV_TRANSFER_DOWNLOAD | 表示傳輸是資料流程型下載作業 (亦即,從裝置傳輸到應用程式的資料) 。 應用程式不會直接設定此位。 The WIA service sets this bit if the application calls IWiaTransfer::Download. |
| WIA_MINIDRV_TRANSFER_UPLOAD | 指出傳輸是資料流程型上傳作業 (亦即,從應用程式傳輸至裝置) 的資料。 應用程式不會直接設定此位。 The WIA service sets this bit if the application calls IWiaTransfer::Upload. |
| WIA_MINIDRV_TRANSFER_ACQUIRE_CHILDREN | 表示驅動程式應該執行資料夾傳輸。 如果在資料夾項目上呼叫此值,應用程式會要求傳輸該資料夾的子系。 This value will be set if an application requests a folder transfer by setting the lFlags parameter of IWiaTransfer::Download to WIA_TRANSFER_ACQUIRE_CHILDREN and the driver has specified that it can transfer multiple children in one scan. If the driver cannot perform this type of transfer, the WIA service will make multiple calls into the driver and WIA_MINIDRV_TRANSFER_ACQUIRE_CHILDREN will not be set. |