server: Support ConDrv/CurrentOut device.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bededeccc5
commit
52c04e1e39
|
@ -173,6 +173,8 @@ struct screen_buffer
|
||||||
static void screen_buffer_dump( struct object *obj, int verbose );
|
static void screen_buffer_dump( struct object *obj, int verbose );
|
||||||
static void screen_buffer_destroy( struct object *obj );
|
static void screen_buffer_destroy( struct object *obj );
|
||||||
static struct fd *screen_buffer_get_fd( struct object *obj );
|
static struct fd *screen_buffer_get_fd( struct object *obj );
|
||||||
|
static struct object *screen_buffer_open_file( struct object *obj, unsigned int access,
|
||||||
|
unsigned int sharing, unsigned int options );
|
||||||
|
|
||||||
static const struct object_ops screen_buffer_ops =
|
static const struct object_ops screen_buffer_ops =
|
||||||
{
|
{
|
||||||
|
@ -191,7 +193,7 @@ static const struct object_ops screen_buffer_ops =
|
||||||
no_lookup_name, /* lookup_name */
|
no_lookup_name, /* lookup_name */
|
||||||
no_link_name, /* link_name */
|
no_link_name, /* link_name */
|
||||||
NULL, /* unlink_name */
|
NULL, /* unlink_name */
|
||||||
no_open_file, /* open_file */
|
screen_buffer_open_file, /* open_file */
|
||||||
no_kernel_obj_list, /* get_kernel_obj_list */
|
no_kernel_obj_list, /* get_kernel_obj_list */
|
||||||
no_close_handle, /* close_handle */
|
no_close_handle, /* close_handle */
|
||||||
screen_buffer_destroy /* destroy */
|
screen_buffer_destroy /* destroy */
|
||||||
|
@ -1247,6 +1249,12 @@ static void screen_buffer_destroy( struct object *obj )
|
||||||
free( screen_buffer->font.face_name );
|
free( screen_buffer->font.face_name );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct object *screen_buffer_open_file( struct object *obj, unsigned int access,
|
||||||
|
unsigned int sharing, unsigned int options )
|
||||||
|
{
|
||||||
|
return grab_object( obj );
|
||||||
|
}
|
||||||
|
|
||||||
static struct fd *screen_buffer_get_fd( struct object *obj )
|
static struct fd *screen_buffer_get_fd( struct object *obj )
|
||||||
{
|
{
|
||||||
struct screen_buffer *screen_buffer = (struct screen_buffer*)obj;
|
struct screen_buffer *screen_buffer = (struct screen_buffer*)obj;
|
||||||
|
@ -1493,6 +1501,7 @@ static struct object *console_device_lookup_name( struct object *obj, struct uni
|
||||||
{
|
{
|
||||||
static const WCHAR consoleW[] = {'C','o','n','s','o','l','e'};
|
static const WCHAR consoleW[] = {'C','o','n','s','o','l','e'};
|
||||||
static const WCHAR current_inW[] = {'C','u','r','r','e','n','t','I','n'};
|
static const WCHAR current_inW[] = {'C','u','r','r','e','n','t','I','n'};
|
||||||
|
static const WCHAR current_outW[] = {'C','u','r','r','e','n','t','O','u','t'};
|
||||||
|
|
||||||
if (name->len == sizeof(current_inW) && !memcmp( name->str, current_inW, name->len ))
|
if (name->len == sizeof(current_inW) && !memcmp( name->str, current_inW, name->len ))
|
||||||
{
|
{
|
||||||
|
@ -1505,6 +1514,17 @@ static struct object *console_device_lookup_name( struct object *obj, struct uni
|
||||||
return grab_object( current->process->console );
|
return grab_object( current->process->console );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name->len == sizeof(current_outW) && !memcmp( name->str, current_outW, name->len ))
|
||||||
|
{
|
||||||
|
if (!current->process->console || !current->process->console->active)
|
||||||
|
{
|
||||||
|
set_error( STATUS_INVALID_HANDLE );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
name->len = 0;
|
||||||
|
return grab_object( current->process->console->active );
|
||||||
|
}
|
||||||
|
|
||||||
if (name->len == sizeof(consoleW) && !memcmp( name->str, consoleW, name->len ))
|
if (name->len == sizeof(consoleW) && !memcmp( name->str, consoleW, name->len ))
|
||||||
{
|
{
|
||||||
name->len = 0;
|
name->len = 0;
|
||||||
|
|
Loading…
Reference in New Issue