
Section 5. Example Applications
131
C++ EXAMPLE
The following is an example of C++:
/* -------------------------------------------------------------------------- */
/*
TST: Test Application
*/
/*
*/
/*
MTDTEST.C - Test module for Mag-Tek device drivers
*/
/* -------------------------------------------------------------------------- */
/* Version 1.00
$Revision::
$ */
/* -------------------------------------------------------------------------- */
#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include <string.h>
/* --- Static variables ----------------------------------------------------- */
static volatile BOOL
quit = FALSE;
static char
sbuff[128];
static HANDLE
drv_h;
static HANDLE
in_threadh;
static HANDLE
out_threadh;
static OVERLAPPED
ov_r, ov_w;
/* --- Macro definitions ---------------------------------------------------- */
#define OPEN_DEVICE(name)
\
CreateFile(
\
(name),
/* LPCTSTR - pointer to name of the file */ \
GENERIC_READ | GENERIC_WRITE,/* DWORD
- access (read-write) mode
*/ \
0,
/* DWORD
- share mode
*/ \
NULL,
/* LPSECURITY_ATTRIBUTES
*/ \
/*
- pointer to security attribs */ \
OPEN_EXISTING,
/* DWORD
- how to create
*/ \
0
|
\
FILE_FLAG_OVERLAPPED,
/* DWORD
- file attributes
*/ \
NULL
/* HANDLE
- template handle
*/ \
)
/* --- Internal Function Prototypes ----------------------------------------- */
void
input_thread
(void *p);
void
output_thread
(void *p);
/* --- Main ----------------------------------------------------------------- */
int main ( int argc, char *argv[])
{
HANDLE
ret_h;
DWORD
ws;
DWORD
retdw;
int
stage=1;
Содержание Entuitive 1525L Series
Страница 8: ...2 5 Side View Base Bottom View User Controls ...
Страница 27: ...2 24 E l o E n t u i t i v e T o u c h m o n i t o r U s e r G u i d e ...
Страница 31: ...3 28 E l o E n t u i t i v e T o u c h m o n i t o r U s e r G u i d e ...
Страница 44: ...C 41 See Detail A Detail A ...
Страница 45: ...C 42 E l o E n t u i t i v e T o u c h m o n i t o r U s e r G u i d e ...
Страница 48: ...45 N10051 ...
Страница 49: ...46 E l o E n t u i t i v e T o u c h m o n i t o r U s e r G u i d e ...
Страница 59: ...56 Figure 1 1 USB Swipe Reader ...
Страница 63: ...USB Swipe Reader 60 ...
Страница 67: ...USB Swipe Reader 64 ...
Страница 69: ...USB Swipe Reader 66 ...
Страница 89: ...86 Figure 1 1 MagTek Devices and Device Drivers for Windows MTD MagTek Device Drivers for Windows ...
Страница 117: ...MagTek Device Drivers for Windows 114 ...
Страница 127: ...MagTek Device Drivers for Windows 124 ...
Страница 141: ...MagTek Device Drivers for Windows 138 ...
Страница 163: ...MagTek Device Drivers for Windows 160 ...
Страница 165: ...MagTek Device Drivers for Windows 162 ...
Страница 167: ...MagTek Device Drivers for Windows 164 ...