2 * Server-side handle definitions
4 * Copyright (C) 1999 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_SERVER_HANDLE_H
22 #define __WINE_SERVER_HANDLE_H
26 #include "wine/server_protocol.h"
31 /* handle functions */
33 /* alloc_handle takes a void *obj for convenience, but you better make sure */
34 /* that the thing pointed to starts with a struct object... */
35 extern handle_t
alloc_handle( struct process
*process
, void *obj
,
36 unsigned int access
, int inherit
);
37 extern int close_handle( struct process
*process
, handle_t handle
, int *fd
);
38 extern struct object
*get_handle_obj( struct process
*process
, handle_t handle
,
39 unsigned int access
, const struct object_ops
*ops
);
40 extern int get_handle_fd( struct process
*process
, handle_t handle
, unsigned int access
);
41 extern handle_t
duplicate_handle( struct process
*src
, handle_t src_handle
, struct process
*dst
,
42 unsigned int access
, int inherit
, int options
);
43 extern handle_t
open_object( const WCHAR
*name
, size_t len
, const struct object_ops
*ops
,
44 unsigned int access
, int inherit
);
45 extern struct object
*alloc_handle_table( struct process
*process
, int count
);
46 extern struct object
*copy_handle_table( struct process
*process
, struct process
*parent
);
47 extern void close_global_handles(void);
49 #endif /* __WINE_SERVER_HANDLE_H */