[1/4] twain_32: Notify data sources of their assigned Id.
Vincent Povirk
vincent at codeweavers.com
Fri Oct 20 14:16:25 CDT 2017
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
This series helps with bug 28141. Updates to gphoto2.ds to follow when I get a test environment working.
---
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;
--
2.7.4
More information about the wine-patches
mailing list