diff --git a/faq/how-to-exclude-wia-sources-in-the-source-list.md b/faq/how-to-exclude-wia-sources-in-the-source-list.md index cde5f922..e8f2d749 100644 --- a/faq/how-to-exclude-wia-sources-in-the-source-list.md +++ b/faq/how-to-exclude-wia-sources-in-the-source-list.md @@ -15,7 +15,7 @@ permalink: /faq/how-to-exclude-wia-sources-in-the-source-list.html > Applicable to Windows only - +There are two ways to achieve this: * Set [IfUseTwainDSM]({{site.info}}api/WebTwain_Acquire.html#ifusetwaindsm) to `true` @@ -23,4 +23,15 @@ permalink: /faq/how-to-exclude-wia-sources-in-the-source-list.html DWObject.IfUseTwainDSM = true; ``` +* Filter sources before listing them + +``` javascript +var sources = DWObject.GetSourceNames(); +for (var i = 0; i < sources.length; i++) { + if (sources[i].toLowerCase().indexOf('wia') != -1) { + sources.splice(i, 1); + } +} +``` + If you are still having issues with a device, please feel free to [contact us](https://www.dynamsoft.com/company/contact/) via email, live chat, or phone call. \ No newline at end of file