Parent Directory | Revision Log
Commit of work in progress on channels (so that other people can hack on RDPSND), in particular: * channel layer takes care of virtual channel header * split X dependent parts out of CLIPRDR, simplified IPC implementation * initial RDPDR implementation
1 | matthewc | 432 | #include "rdesktop.h" |
2 | |||
3 | FILE *printer_fp; | ||
4 | |||
5 | static NTSTATUS | ||
6 | printer_create(HANDLE *handle) | ||
7 | { | ||
8 | printer_fp = popen("lpr", "w"); | ||
9 | *handle = 0; | ||
10 | return STATUS_SUCCESS; | ||
11 | } | ||
12 | |||
13 | static NTSTATUS | ||
14 | printer_close(HANDLE handle) | ||
15 | { | ||
16 | pclose(printer_fp); | ||
17 | return STATUS_SUCCESS; | ||
18 | } | ||
19 | |||
20 | static NTSTATUS | ||
21 | printer_write(HANDLE handle, uint8 *data, uint32 length, uint32 *result) | ||
22 | { | ||
23 | *result = fwrite(data, 1, length, printer_fp); | ||
24 | return STATUS_SUCCESS; | ||
25 | } | ||
26 | |||
27 | DEVICE_FNS printer_fns = | ||
28 | { | ||
29 | printer_create, | ||
30 | printer_close, | ||
31 | NULL, /* read */ | ||
32 | printer_write, | ||
33 | NULL /* device_control */ | ||
34 | }; | ||
35 |
ViewVC Help | |
Powered by ViewVC 1.1.26 |