1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* FreeRDP Windows Server
*
* Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
* Copyright 2012-2013 Corey Clayton <can.of.tuna@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FREERDP_SERVER_WIN_MIRAGE_H
#define FREERDP_SERVER_WIN_MIRAGE_H
#include "wf_interface.h"
enum
{
MIRROR_LOAD = 0,
MIRROR_UNLOAD = 1
};
enum
{
DMF_ESCAPE_BASE_1_VB = 1030,
DMF_ESCAPE_BASE_2_VB = 1026,
DMF_ESCAPE_BASE_3_VB = 24
};
#ifdef _WIN64
#define CLIENT_64BIT 0x8000
enum
{
DMF_ESCAPE_BASE_1 = CLIENT_64BIT | DMF_ESCAPE_BASE_1_VB,
DMF_ESCAPE_BASE_2 = CLIENT_64BIT | DMF_ESCAPE_BASE_2_VB,
DMF_ESCAPE_BASE_3 = CLIENT_64BIT | DMF_ESCAPE_BASE_3_VB,
};
#else
enum
{
DMF_ESCAPE_BASE_1 = DMF_ESCAPE_BASE_1_VB,
DMF_ESCAPE_BASE_2 = DMF_ESCAPE_BASE_2_VB,
DMF_ESCAPE_BASE_3 = DMF_ESCAPE_BASE_3_VB,
};
#endif
typedef enum
{
dmf_esc_qry_ver_info = DMF_ESCAPE_BASE_2 + 0,
dmf_esc_usm_pipe_map = DMF_ESCAPE_BASE_1 + 0,
dmf_esc_usm_pipe_unmap = DMF_ESCAPE_BASE_1 + 1,
dmf_esc_test = DMF_ESCAPE_BASE_1 + 20,
dmf_esc_usm_pipe_mapping_test = DMF_ESCAPE_BASE_1 + 21,
dmf_esc_pointer_shape_get = DMF_ESCAPE_BASE_3,
} dmf_escape;
#define CLIP_LIMIT 50
#define MAXCHANGES_BUF 20000
typedef enum
{
dmf_dfo_IGNORE = 0,
dmf_dfo_FROM_SCREEN = 1,
dmf_dfo_FROM_DIB = 2,
dmf_dfo_TO_SCREEN = 3,
dmf_dfo_SCREEN_SCREEN = 11,
dmf_dfo_BLIT = 12,
dmf_dfo_SOLIDFILL = 13,
dmf_dfo_BLEND = 14,
dmf_dfo_TRANS = 15,
dmf_dfo_PLG = 17,
dmf_dfo_TEXTOUT = 18,
dmf_dfo_Ptr_Shape = 19,
dmf_dfo_Ptr_Engage = 48,
dmf_dfo_Ptr_Avert = 49,
dmf_dfn_assert_on = 64,
dmf_dfn_assert_off = 65,
} dmf_UpdEvent;
#define NOCACHE 1
#define OLDCACHE 2
#define NEWCACHE 3
typedef struct
{
ULONG type;
RECT rect;
#ifndef DFMIRAGE_LEAN
RECT origrect;
POINT point;
ULONG color;
ULONG refcolor;
#endif
} CHANGES_RECORD;
typedef CHANGES_RECORD* PCHANGES_RECORD;
typedef struct
{
ULONG counter;
CHANGES_RECORD pointrect[MAXCHANGES_BUF];
} CHANGES_BUF;
#define EXT_DEVMODE_SIZE_MAX 3072
#define DMF_PIPE_SEC_SIZE_DEFAULT ALIGN64K(sizeof(CHANGES_BUF))
typedef struct
{
CHANGES_BUF* buffer;
PVOID Userbuffer;
} GETCHANGESBUF;
#define dmf_sprb_ERRORMASK 0x07FF
#define dmf_sprb_STRICTSESSION_AFF 0x1FFF
typedef enum
{
dmf_sprb_internal_error = 0x0001,
dmf_sprb_miniport_gen_error = 0x0004,
dmf_sprb_memory_alloc_failed = 0x0008,
dmf_sprb_pipe_buff_overflow = 0x0010,
dmf_sprb_pipe_buff_insufficient = 0x0020,
dmf_sprb_pipe_not_ready = 0x0040,
dmf_sprb_gdi_err = 0x0100,
dmf_sprb_owner_died = 0x0400,
dmf_sprb_tgtwnd_gone = 0x0800,
dmf_sprb_pdev_detached = 0x2000,
} dmf_session_prob_status;
#define DMF_ESC_RET_FAILF 0x80000000
#define DMF_ESC_RET_SSTMASK 0x0000FFFF
#define DMF_ESC_RET_IMMMASK 0x7FFF0000
typedef enum
{
dmf_escret_generic_ok = 0x00010000,
dmf_escret_bad_state = 0x00100000,
dmf_escret_access_denied = 0x00200000,
dmf_escret_bad_buffer_size = 0x00400000,
dmf_escret_internal_err = 0x00800000,
dmf_escret_out_of_memory = 0x02000000,
dmf_escret_already_connected = 0x04000000,
dmf_escret_oh_boy_too_late = 0x08000000,
dmf_escret_bad_window = 0x10000000,
dmf_escret_drv_ver_higher = 0x20000000,
dmf_escret_drv_ver_lower = 0x40000000,
} dmf_esc_retcode;
typedef struct
{
ULONG cbSize;
ULONG app_actual_version;
ULONG display_minreq_version;
ULONG connect_options;
} Esc_dmf_Qvi_IN;
enum
{
esc_qvi_prod_name_max = 16,
};
#define ESC_QVI_PROD_MIRAGE "MIRAGE"
#define ESC_QVI_PROD_QUASAR "QUASAR"
typedef struct
{
ULONG cbSize;
ULONG display_actual_version;
ULONG miniport_actual_version;
ULONG app_minreq_version;
ULONG display_buildno;
ULONG miniport_buildno;
char prod_name[esc_qvi_prod_name_max];
} Esc_dmf_Qvi_OUT;
typedef struct
{
ULONG cbSize;
char* pDstBmBuf;
ULONG nDstBmBufSize;
} Esc_dmf_pointer_shape_get_IN;
typedef struct
{
ULONG cbSize;
POINTL BmSize;
char* pMaskBm;
ULONG nMaskBmSize;
char* pColorBm;
ULONG nColorBmSize;
char* pColorBmPal;
ULONG nColorBmPalEntries;
} Esc_dmf_pointer_shape_get_OUT;
BOOL wf_mirror_driver_find_display_device(wfInfo* wfi);
BOOL wf_mirror_driver_display_device_attach(wfInfo* wfi, DWORD mode);
BOOL wf_mirror_driver_update(wfInfo* wfi, int mode);
BOOL wf_mirror_driver_map_memory(wfInfo* wfi);
BOOL wf_mirror_driver_cleanup(wfInfo* wfi);
BOOL wf_mirror_driver_activate(wfInfo* wfi);
void wf_mirror_driver_deactivate(wfInfo* wfi);
#endif /* FREERDP_SERVER_WIN_MIRAGE_H */
|