server: Added a request to unlink an object from its namespace.

This commit is contained in:
Alexandre Julliard 2008-10-20 16:21:06 +02:00
parent 07badc790a
commit ba71579809
5 changed files with 46 additions and 1 deletions

View File

@ -4042,6 +4042,19 @@ struct get_object_info_reply
};
struct unlink_object_request
{
struct request_header __header;
obj_handle_t handle;
};
struct unlink_object_reply
{
struct reply_header __header;
};
struct get_token_impersonation_level_request
{
struct request_header __header;
@ -4516,6 +4529,7 @@ enum request
REQ_open_symlink,
REQ_query_symlink,
REQ_get_object_info,
REQ_unlink_object,
REQ_get_token_impersonation_level,
REQ_allocate_locally_unique_id,
REQ_create_device_manager,
@ -4757,6 +4771,7 @@ union generic_request
struct open_symlink_request open_symlink_request;
struct query_symlink_request query_symlink_request;
struct get_object_info_request get_object_info_request;
struct unlink_object_request unlink_object_request;
struct get_token_impersonation_level_request get_token_impersonation_level_request;
struct allocate_locally_unique_id_request allocate_locally_unique_id_request;
struct create_device_manager_request create_device_manager_request;
@ -4996,6 +5011,7 @@ union generic_reply
struct open_symlink_reply open_symlink_reply;
struct query_symlink_reply query_symlink_reply;
struct get_object_info_reply get_object_info_reply;
struct unlink_object_reply unlink_object_reply;
struct get_token_impersonation_level_reply get_token_impersonation_level_reply;
struct allocate_locally_unique_id_reply allocate_locally_unique_id_reply;
struct create_device_manager_reply create_device_manager_reply;
@ -5015,6 +5031,6 @@ union generic_reply
struct set_window_layered_info_reply set_window_layered_info_reply;
};
#define SERVER_PROTOCOL_VERSION 342
#define SERVER_PROTOCOL_VERSION 343
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */

View File

@ -508,3 +508,15 @@ DECL_HANDLER(get_directory_entry)
release_object( dir );
}
}
/* unlink a named object */
DECL_HANDLER(unlink_object)
{
struct object *obj = get_handle_obj( current->process, req->handle, 0, NULL );
if (obj)
{
unlink_named_object( obj );
release_object( obj );
}
}

View File

@ -2913,6 +2913,13 @@ enum message_type
unsigned int ref_count; /* object ref count */
@END
/* Unlink a named object */
@REQ(unlink_object)
obj_handle_t handle; /* handle to the object */
@END
/* Query the impersonation level of an impersonation token */
@REQ(get_token_impersonation_level)
obj_handle_t handle; /* handle to the object */

View File

@ -328,6 +328,7 @@ DECL_HANDLER(create_symlink);
DECL_HANDLER(open_symlink);
DECL_HANDLER(query_symlink);
DECL_HANDLER(get_object_info);
DECL_HANDLER(unlink_object);
DECL_HANDLER(get_token_impersonation_level);
DECL_HANDLER(allocate_locally_unique_id);
DECL_HANDLER(create_device_manager);
@ -568,6 +569,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(req_handler)req_open_symlink,
(req_handler)req_query_symlink,
(req_handler)req_get_object_info,
(req_handler)req_unlink_object,
(req_handler)req_get_token_impersonation_level,
(req_handler)req_allocate_locally_unique_id,
(req_handler)req_create_device_manager,

View File

@ -3595,6 +3595,11 @@ static void dump_get_object_info_reply( const struct get_object_info_reply *req
fprintf( stderr, " ref_count=%08x", req->ref_count );
}
static void dump_unlink_object_request( const struct unlink_object_request *req )
{
fprintf( stderr, " handle=%p", req->handle );
}
static void dump_get_token_impersonation_level_request( const struct get_token_impersonation_level_request *req )
{
fprintf( stderr, " handle=%p", req->handle );
@ -4011,6 +4016,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_open_symlink_request,
(dump_func)dump_query_symlink_request,
(dump_func)dump_get_object_info_request,
(dump_func)dump_unlink_object_request,
(dump_func)dump_get_token_impersonation_level_request,
(dump_func)dump_allocate_locally_unique_id_request,
(dump_func)dump_create_device_manager_request,
@ -4248,6 +4254,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_open_symlink_reply,
(dump_func)dump_query_symlink_reply,
(dump_func)dump_get_object_info_reply,
(dump_func)0,
(dump_func)dump_get_token_impersonation_level_reply,
(dump_func)dump_allocate_locally_unique_id_reply,
(dump_func)dump_create_device_manager_reply,
@ -4485,6 +4492,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"open_symlink",
"query_symlink",
"get_object_info",
"unlink_object",
"get_token_impersonation_level",
"allocate_locally_unique_id",
"create_device_manager",