18 |
|
|
19 |
extern RDPDR_DEVICE g_rdpdr_device[]; |
extern RDPDR_DEVICE g_rdpdr_device[]; |
20 |
|
|
|
static PARALLEL_DEVICE * |
|
|
get_parallel_data(NTHANDLE handle) |
|
|
{ |
|
|
int index; |
|
|
|
|
|
for (index = 0; index < RDPDR_MAX_DEVICES; index++) |
|
|
{ |
|
|
if (handle == g_rdpdr_device[index].handle) |
|
|
return (PARALLEL_DEVICE *) g_rdpdr_device[index].pdevice_data; |
|
|
} |
|
|
return NULL; |
|
|
} |
|
|
|
|
21 |
|
|
22 |
/* Enumeration of devices from rdesktop.c */ |
/* Enumeration of devices from rdesktop.c */ |
23 |
/* returns numer of units found and initialized. */ |
/* returns numer of units found and initialized. */ |
113 |
int n = write(handle, data, length); |
int n = write(handle, data, length); |
114 |
if (n < 0) |
if (n < 0) |
115 |
{ |
{ |
116 |
|
#if defined(LPGETSTATUS) |
117 |
int status; |
int status; |
118 |
|
#endif |
119 |
|
|
120 |
*result = 0; |
*result = 0; |
121 |
switch (errno) |
switch (errno) |