Event Handling for Data Sources via OS Reacquisition
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
It is challenging to implement event handling for peripheral device control using APIs like TWAIN, especially in environments where programming knowledge of C/C++ is required and event handling must be performed in the same thread, making it difficult to operate data sources from applications effectively.
Innovation Solution
An information processing apparatus that determines whether a data source can handle events received via an API and acquires necessary events from the Operating System when determination indicates inability to handle, ensuring proper operation of the data source.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If event handling is implemented using conventional TWAIN API, then data source control functionality is achieved, but programming complexity increases and requires C/C++ knowledge and same-thread event handling
Solution Approach 1:
The patent introduces an intermediary layer that translates between conventional TWAIN API event handling and modern execution environment event models. This mediator component receives events from the application, determines whether the data source can handle them, and either processes them directly or acquires equivalent events from the OS, thereby bridging the gap between legacy API requirements and modern programming environments without requiring users to have C/C++ expertise or understand same-thread constraints
Solution Approach 2:
The patent creates a copy of the event handling mechanism by implementing an alternative event acquisition path from the OS that mirrors the functionality of TWAIN event handling. Instead of requiring direct TWAIN event processing, the system copies the necessary event information from the OS event queue, allowing applications to operate data sources using familiar modern event models while maintaining TWAIN API compatibility
2Reliability
If event handling is restricted to the same thread as per TWAIN requirements, then API compliance is maintained, but applicability to modern multithreaded environments is reduced
Solution Approach 1:
The patent implements a dynamic event handling approach where the system adaptively determines whether to process events through the TWAIN API path or acquire them from the OS based on the current execution environment and data source capabilities. This dynamic switching mechanism allows the same system to comply with TWAIN same-thread requirements when necessary while also supporting modern multithreaded environments by acquiring events from the OS event queue when appropriate
Solution Approach 2:
The patent changes the parameter of event source from fixed (TWAIN API only) to variable (TWAIN API or OS event queue). By introducing a determination step that checks whether the data source can handle TWAIN events and conditionally switching the event acquisition source, the system maintains TWAIN API compliance when needed while gaining versatility to operate in modern multithreaded execution environments that don't support same-thread event handling
Data Source
AI summary
It is determined whether a data source can handle an event that an application that operates on an OS (Operating System) receives via a predetermined API. If it is determined that the data source cannot handle the event, the event necessary for the operation of the data source is acquired from the OS.


