1999-05-15 03:48:19 -07:00
|
|
|
/*
|
|
|
|
* Server-side handle definitions
|
|
|
|
*
|
|
|
|
* Copyright (C) 1999 Alexandre Julliard
|
2002-03-09 16:29:33 -07:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 05:49:52 -07:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1999-05-15 03:48:19 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_SERVER_HANDLE_H
|
|
|
|
#define __WINE_SERVER_HANDLE_H
|
|
|
|
|
1999-06-22 10:26:53 -07:00
|
|
|
#include <stdlib.h>
|
1999-11-25 14:30:24 -07:00
|
|
|
#include "windef.h"
|
2001-07-18 17:35:37 -07:00
|
|
|
#include "wine/server_protocol.h"
|
1999-06-22 10:26:53 -07:00
|
|
|
|
1999-05-15 03:48:19 -07:00
|
|
|
struct process;
|
|
|
|
struct object_ops;
|
2002-10-02 16:49:30 -07:00
|
|
|
struct namespace;
|
2005-11-18 09:31:18 -07:00
|
|
|
struct unicode_str;
|
1999-05-15 03:48:19 -07:00
|
|
|
|
|
|
|
/* handle functions */
|
|
|
|
|
|
|
|
/* alloc_handle takes a void *obj for convenience, but you better make sure */
|
|
|
|
/* that the thing pointed to starts with a struct object... */
|
2002-05-30 13:12:58 -07:00
|
|
|
extern obj_handle_t alloc_handle( struct process *process, void *obj,
|
2005-12-09 05:58:25 -07:00
|
|
|
unsigned int access, unsigned int attr );
|
2007-11-05 07:23:36 -07:00
|
|
|
extern obj_handle_t alloc_handle_no_access_check( struct process *process, void *ptr,
|
|
|
|
unsigned int access, unsigned int attr );
|
2009-12-01 05:59:41 -07:00
|
|
|
extern unsigned int close_handle( struct process *process, obj_handle_t handle );
|
2002-05-30 13:12:58 -07:00
|
|
|
extern struct object *get_handle_obj( struct process *process, obj_handle_t handle,
|
1999-05-15 03:48:19 -07:00
|
|
|
unsigned int access, const struct object_ops *ops );
|
2005-04-24 10:35:52 -07:00
|
|
|
extern unsigned int get_handle_access( struct process *process, obj_handle_t handle );
|
2002-05-30 13:12:58 -07:00
|
|
|
extern obj_handle_t duplicate_handle( struct process *src, obj_handle_t src_handle, struct process *dst,
|
2005-12-09 05:58:25 -07:00
|
|
|
unsigned int access, unsigned int attr, unsigned int options );
|
2016-01-29 00:23:29 -07:00
|
|
|
extern obj_handle_t open_object( struct process *process, obj_handle_t parent, unsigned int access,
|
|
|
|
const struct object_ops *ops, const struct unicode_str *name,
|
|
|
|
unsigned int attr );
|
2002-10-02 16:49:30 -07:00
|
|
|
extern obj_handle_t find_inherited_handle( struct process *process, const struct object_ops *ops );
|
2023-07-19 09:02:06 -07:00
|
|
|
extern unsigned int get_obj_handle_count( struct process *process, const struct object *obj );
|
2010-08-24 03:10:51 -07:00
|
|
|
extern void close_process_handles( struct process *process );
|
2002-10-02 16:49:30 -07:00
|
|
|
extern struct handle_table *alloc_handle_table( struct process *process, int count );
|
2020-09-22 03:24:21 -07:00
|
|
|
extern struct handle_table *copy_handle_table( struct process *process, struct process *parent,
|
2020-09-29 02:12:14 -07:00
|
|
|
const obj_handle_t *handles, unsigned int handle_count,
|
|
|
|
const obj_handle_t *std_handles );
|
2003-09-15 18:07:21 -07:00
|
|
|
extern unsigned int get_handle_table_count( struct process *process);
|
2024-08-28 11:47:44 -07:00
|
|
|
void enum_handles_of_type( const struct object_ops *ops,
|
|
|
|
int (*cb)(struct process*, struct object*, void*), void *user );
|
2003-09-15 18:07:21 -07:00
|
|
|
|
1999-05-15 03:48:19 -07:00
|
|
|
#endif /* __WINE_SERVER_HANDLE_H */
|