Vincent Povirk : twain_32: Notify data sources of their assigned Id.
Alexandre Julliard
julliard at winehq.org
Tue Oct 24 02:40:04 CDT 2017
Module: wine
Branch: master
Commit: 8a118c2e0f5f42836e58f0ca6849d9d57ff40d50
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8a118c2e0f5f42836e58f0ca6849d9d57ff40d50
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Fri Oct 20 14:16:25 2017 -0500
twain_32: Notify data sources of their assigned Id.
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/twain_32/dsm_ctrl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/twain_32/dsm_ctrl.c b/dlls/twain_32/dsm_ctrl.c
index 9d67dfb..b20d55c 100644
--- a/dlls/twain_32/dsm_ctrl.c
+++ b/dlls/twain_32/dsm_ctrl.c
@@ -242,13 +242,14 @@ TW_UINT16 TWAIN_OpenDS (pTW_IDENTITY pOrigin, TW_MEMREF pData)
}
newSource->hmod = hmod;
newSource->dsEntry = (DSENTRYPROC)GetProcAddress(hmod, "DS_Entry");
+ /* Assign id for the opened data source */
+ pIdentity->Id = DSM_sourceId ++;
if (TWRC_SUCCESS != newSource->dsEntry (pOrigin, DG_CONTROL, DAT_IDENTITY, MSG_OPENDS, pIdentity)) {
DSM_twCC = TWCC_OPERATIONERROR;
HeapFree(GetProcessHeap(), 0, newSource);
+ DSM_sourceId--;
return TWRC_FAILURE;
}
- /* Assign name and id for the opened data source */
- pIdentity->Id = DSM_sourceId ++;
/* add the data source to an internal active source list */
newSource->next = activeSources;
newSource->identity.Id = pIdentity->Id;
More information about the wine-cvs
mailing list