#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "twain.h"
#include "twain_i.h"
#include "resource.h"
#include "wine/debug.h"
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (twain) |
|
static void | twain_add_onedriver (const char *dsname) |
|
static void | twain_autodetect (void) |
|
TW_UINT16 | TWAIN_ControlNull (pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, activeDS *pSource, TW_UINT16 MSG, TW_MEMREF pData) |
|
TW_UINT16 | TWAIN_ProcessEvent (pTW_IDENTITY pOrigin, activeDS *pSource, TW_MEMREF pData) |
|
TW_UINT16 | TWAIN_CloseDS (pTW_IDENTITY pOrigin, TW_MEMREF pData) |
|
TW_UINT16 | TWAIN_IdentityGetDefault (pTW_IDENTITY pOrigin, TW_MEMREF pData) |
|
TW_UINT16 | TWAIN_IdentityGetFirst (pTW_IDENTITY pOrigin, TW_MEMREF pData) |
|
TW_UINT16 | TWAIN_IdentityGetNext (pTW_IDENTITY pOrigin, TW_MEMREF pData) |
|
TW_UINT16 | TWAIN_OpenDS (pTW_IDENTITY pOrigin, TW_MEMREF pData) |
|
static INT_PTR CALLBACK | userselect_dlgproc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) |
|
TW_UINT16 | TWAIN_UserSelect (pTW_IDENTITY pOrigin, TW_MEMREF pData) |
|
TW_UINT16 | TWAIN_CloseDSM (pTW_IDENTITY pOrigin, TW_MEMREF pData) |
|
TW_UINT16 | TWAIN_OpenDSM (pTW_IDENTITY pOrigin, TW_MEMREF pData) |
|
TW_UINT16 | TWAIN_GetDSMStatus (pTW_IDENTITY pOrigin, TW_MEMREF pData) |
|
◆ twain_add_onedriver()
Definition at line 51 of file dsm_ctrl.c.
51 {
53 DSENTRYPROC dsEntry;
57
61 return;
62 }
64 if (!dsEntry) {
65 ERR(
"Failed to find DS_Entry() in TWAIN DS %s\n",
debugstr_a(dsname));
66 return;
67 }
68
69 do {
71
77 ERR(
"Source->(DG_CONTROL,DAT_IDENTITY,MSG_GET) failed!\n");
78 break;
79 }
83
86 break;
87 }
89 break;
92 else
99 } while (1);
101}
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
#define GetProcAddress(x, y)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
static struct all_devices * devices
static TW_UINT32 DSM_sourceId
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
static PEXPLICIT_ACCESSW *static HMODULE hmod
#define TWON_PROTOCOLMINOR
#define TWON_PROTOCOLMAJOR
Referenced by twain_autodetect().
◆ twain_autodetect()
◆ TWAIN_CloseDS()
Definition at line 200 of file dsm_ctrl.c.
201{
205
206 TRACE (
"DG_CONTROL/DAT_IDENTITY/MSG_CLOSEDS\n");
207
210 break;
211 prevDS = currentDS;
212 }
213 if (!currentDS) {
216 }
218
219
220
221 if (prevDS)
222 prevDS->next = currentDS->
next;
223 else
228 else
230 return twRC;
231}
#define HeapFree(x, y, z)
struct tagActiveDS * next
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
struct TW_IDENTITY * pTW_IDENTITY
Referenced by TWAIN_SourceManagerHandler().
◆ TWAIN_CloseDSM()
Definition at line 455 of file dsm_ctrl.c.
456{
458
459 TRACE(
"DG_CONTROL/DAT_PARENT/MSG_CLOSEDSM\n");
460
462 {
464
465
466 while (currentDS !=
NULL)
467 {
468 nextDS = currentDS->
next;
471 currentDS = nextDS;
472 }
477 } else {
480 }
481}
static TW_UINT16 DSM_initialized
Referenced by TWAIN_SourceManagerHandler().
◆ TWAIN_ControlNull()
Definition at line 120 of file dsm_ctrl.c.
121{
123
124 TRACE (
"DG_CONTROL/DAT_NULL MSG=%i\n",
MSG);
125
129 {
132 }
133
136 {
139 }
140
143
144
145
146
147
148
157
159}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static UINT event_message
struct list pending_messages
TW_UINT32 TW_UINT16 TW_UINT16 MSG
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
Referenced by DSM_Entry().
◆ TWAIN_GetDSMStatus()
◆ TWAIN_IdentityGetDefault()
◆ TWAIN_IdentityGetFirst()
◆ TWAIN_IdentityGetNext()
◆ TWAIN_OpenDS()
Definition at line 280 of file dsm_ctrl.c.
281{
285 const char *modname =
NULL;
287
288 TRACE(
"DG_CONTROL/DAT_IDENTITY/MSG_OPENDS\n");
291 FIXME(
"seq error\n");
294 }
300 }
301
303
306 break;
309 }
310
311
313 if (!newSource) {
315 FIXME(
"Out of memory.\n");
317 }
320 ERR(
"Failed to load TWAIN Source %s\n",
debugstr_a(modname));
324 }
327
334 }
335
345}
char * strcpy(char *DstString, const char *SrcString)
static void list_init(struct list_entry *head)
#define TWCC_OPERATIONERROR
Referenced by TWAIN_SourceManagerHandler().
◆ TWAIN_OpenDSM()
Definition at line 484 of file dsm_ctrl.c.
485{
487
488 TRACE(
"DG_CONTROL/DAT_PARENT/MSG_OPENDSM\n");
495 } else {
496
499 }
501 return twRC;
502}
UINT WINAPI RegisterWindowMessageA(_In_ LPCSTR)
Referenced by TWAIN_SourceManagerHandler().
◆ TWAIN_ProcessEvent()
Definition at line 162 of file dsm_ctrl.c.
163{
167
169
171 {
173 {
176 event->TWMessage =
message->msg;
179 }
180 else
183 }
184
186 {
191 {
193 }
194 }
195
197}
static void list_remove(struct list_entry *entry)
static int list_empty(struct list_entry *head)
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
Referenced by DSM_Entry().
◆ TWAIN_UserSelect()
Definition at line 428 of file dsm_ctrl.c.
429{
432
433 TRACE(
"DG_CONTROL/DAT_IDENTITY/MSG_USERSELECT SupportedGroups=0x%x ProductName=%s\n",
435
437
440
443 {
447 }
448
452}
static INT_PTR CALLBACK userselect_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
const char int int int static __inline const char * wine_dbgstr_a(const char *s)
TW_UINT32 SupportedGroups
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define MAKEINTRESOURCEW(i)
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
Referenced by TWAIN_SourceManagerHandler().
◆ userselect_dlgproc()
Definition at line 352 of file dsm_ctrl.c.
353{
355 {
357 {
362
364
366
368 {
371
372 if ((
id->SupportedGroups &
data->origin->SupportedGroups) == 0)
373 continue;
374
378 }
379
380 if (any_devices)
381 {
383
384
386 }
387
389 }
395 {
398 }
401 {
405
407
409
412
414
416
417
418
421 }
422 break;
423 }
425}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define GetWindowLongPtrW
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define SetWindowLongPtrW
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
Referenced by TWAIN_UserSelect().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
twain |
| ) |
|
◆ detectionrun
◆ devices
Definition at line 48 of file dsm_ctrl.c.
Referenced by BtrfsDeviceResize::DeviceResizeDlgProc(), file_device_create(), file_device_find_or_create(), get_usage(), MMDevEnum_EnumAudioEndpoints(), pnfs_file_device_get(), pnfs_file_device_list_create(), pnfs_file_device_list_free(), pnfs_file_device_list_invalidate(), pnfs_file_device_notify(), read_data(), read_data_dup(), read_data_raid0(), read_data_raid10(), read_data_raid5(), read_data_raid6(), test_api(), test_GetRawInputDeviceList(), twain_add_onedriver(), TWAIN_IdentityGetDefault(), TWAIN_IdentityGetFirst(), TWAIN_IdentityGetNext(), TWAIN_OpenDS(), and userselect_dlgproc().
◆ DSM_currentDevice
◆ DSM_initialized
◆ DSM_parent
◆ DSM_sourceId
◆ event_message
◆ nrdevices