Commit 8a118c2e authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

twain_32: Notify data sources of their assigned Id.

parent a6ad46dc
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment