Implemented RegFlushKey and NtFlushKey.
This commit is contained in:
parent
071b7dae8a
commit
43cb03be3a
|
@ -1831,8 +1831,10 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInformati
|
|||
*/
|
||||
DWORD WINAPI RegFlushKey( HKEY hkey )
|
||||
{
|
||||
FIXME( "(%p): stub\n", hkey );
|
||||
return ERROR_SUCCESS;
|
||||
hkey = get_special_root_hkey( hkey );
|
||||
if (!hkey) return ERROR_INVALID_HANDLE;
|
||||
|
||||
return RtlNtStatusToDosError( NtFlushKey( hkey ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -306,6 +306,14 @@ static DWORD VMM_RegCloseKey( HKEY hkey )
|
|||
return RtlNtStatusToDosError( NtClose( hkey ) );
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* VMM_RegFlushKey
|
||||
*/
|
||||
static DWORD VMM_RegFlushKey( HKEY hkey )
|
||||
{
|
||||
return RtlNtStatusToDosError( NtFlushKey( hkey ) );
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* VMM_RegDeleteKeyA
|
||||
|
@ -805,8 +813,7 @@ static DWORD VxDCall_VMM( DWORD service, CONTEXT86 *context )
|
|||
case 0x001C: /* RegFlushKey */
|
||||
{
|
||||
HKEY hkey = (HKEY)stack32_pop( context );
|
||||
FIXME( "RegFlushKey(%p): stub\n", hkey );
|
||||
return ERROR_SUCCESS;
|
||||
return VMM_RegFlushKey( hkey );
|
||||
}
|
||||
|
||||
case 0x001D: /* RegQueryInfoKey */
|
||||
|
|
|
@ -542,11 +542,20 @@ NTSTATUS WINAPI RtlpNtQueryValueKey( HKEY handle, ULONG *result_type, PBYTE dest
|
|||
* NtFlushKey [NTDLL.@]
|
||||
* ZwFlushKey [NTDLL.@]
|
||||
*/
|
||||
NTSTATUS WINAPI NtFlushKey(HKEY KeyHandle)
|
||||
NTSTATUS WINAPI NtFlushKey(HKEY key)
|
||||
{
|
||||
FIXME("(%p) stub!\n",
|
||||
KeyHandle);
|
||||
return 1;
|
||||
NTSTATUS ret;
|
||||
|
||||
TRACE("key=%p\n", key);
|
||||
|
||||
SERVER_START_REQ( flush_key )
|
||||
{
|
||||
req->hkey = key;
|
||||
ret = wine_server_call( req );
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
@ -1795,6 +1795,18 @@ struct delete_key_reply
|
|||
|
||||
|
||||
|
||||
struct flush_key_request
|
||||
{
|
||||
struct request_header __header;
|
||||
obj_handle_t hkey;
|
||||
};
|
||||
struct flush_key_reply
|
||||
{
|
||||
struct reply_header __header;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct enum_key_request
|
||||
{
|
||||
struct request_header __header;
|
||||
|
@ -3284,6 +3296,7 @@ enum request
|
|||
REQ_create_key,
|
||||
REQ_open_key,
|
||||
REQ_delete_key,
|
||||
REQ_flush_key,
|
||||
REQ_enum_key,
|
||||
REQ_set_key_value,
|
||||
REQ_get_key_value,
|
||||
|
@ -3473,6 +3486,7 @@ union generic_request
|
|||
struct create_key_request create_key_request;
|
||||
struct open_key_request open_key_request;
|
||||
struct delete_key_request delete_key_request;
|
||||
struct flush_key_request flush_key_request;
|
||||
struct enum_key_request enum_key_request;
|
||||
struct set_key_value_request set_key_value_request;
|
||||
struct get_key_value_request get_key_value_request;
|
||||
|
@ -3660,6 +3674,7 @@ union generic_reply
|
|||
struct create_key_reply create_key_reply;
|
||||
struct open_key_reply open_key_reply;
|
||||
struct delete_key_reply delete_key_reply;
|
||||
struct flush_key_reply flush_key_reply;
|
||||
struct enum_key_reply enum_key_reply;
|
||||
struct set_key_value_reply set_key_value_reply;
|
||||
struct get_key_value_reply get_key_value_reply;
|
||||
|
@ -3747,6 +3762,6 @@ union generic_reply
|
|||
struct set_global_windows_reply set_global_windows_reply;
|
||||
};
|
||||
|
||||
#define SERVER_PROTOCOL_VERSION 130
|
||||
#define SERVER_PROTOCOL_VERSION 131
|
||||
|
||||
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||
|
|
|
@ -1295,6 +1295,12 @@ enum char_info_mode
|
|||
@END
|
||||
|
||||
|
||||
/* Flush a registry key */
|
||||
@REQ(flush_key)
|
||||
obj_handle_t hkey; /* handle to the key */
|
||||
@END
|
||||
|
||||
|
||||
/* Enumerate registry subkeys */
|
||||
@REQ(enum_key)
|
||||
obj_handle_t hkey; /* handle to registry key */
|
||||
|
|
|
@ -1777,6 +1777,17 @@ DECL_HANDLER(delete_key)
|
|||
}
|
||||
}
|
||||
|
||||
/* flush a registry key */
|
||||
DECL_HANDLER(flush_key)
|
||||
{
|
||||
struct key *key = get_hkey_obj( req->hkey, 0 );
|
||||
if (key)
|
||||
{
|
||||
/* we don't need to do anything here with the current implementation */
|
||||
release_object( key );
|
||||
}
|
||||
}
|
||||
|
||||
/* enumerate registry subkeys */
|
||||
DECL_HANDLER(enum_key)
|
||||
{
|
||||
|
|
|
@ -200,6 +200,7 @@ DECL_HANDLER(write_process_memory);
|
|||
DECL_HANDLER(create_key);
|
||||
DECL_HANDLER(open_key);
|
||||
DECL_HANDLER(delete_key);
|
||||
DECL_HANDLER(flush_key);
|
||||
DECL_HANDLER(enum_key);
|
||||
DECL_HANDLER(set_key_value);
|
||||
DECL_HANDLER(get_key_value);
|
||||
|
@ -388,6 +389,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
|
|||
(req_handler)req_create_key,
|
||||
(req_handler)req_open_key,
|
||||
(req_handler)req_delete_key,
|
||||
(req_handler)req_flush_key,
|
||||
(req_handler)req_enum_key,
|
||||
(req_handler)req_set_key_value,
|
||||
(req_handler)req_get_key_value,
|
||||
|
|
|
@ -1563,6 +1563,11 @@ static void dump_delete_key_request( const struct delete_key_request *req )
|
|||
fprintf( stderr, " hkey=%p", req->hkey );
|
||||
}
|
||||
|
||||
static void dump_flush_key_request( const struct flush_key_request *req )
|
||||
{
|
||||
fprintf( stderr, " hkey=%p", req->hkey );
|
||||
}
|
||||
|
||||
static void dump_enum_key_request( const struct enum_key_request *req )
|
||||
{
|
||||
fprintf( stderr, " hkey=%p,", req->hkey );
|
||||
|
@ -2694,6 +2699,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
|
|||
(dump_func)dump_create_key_request,
|
||||
(dump_func)dump_open_key_request,
|
||||
(dump_func)dump_delete_key_request,
|
||||
(dump_func)dump_flush_key_request,
|
||||
(dump_func)dump_enum_key_request,
|
||||
(dump_func)dump_set_key_value_request,
|
||||
(dump_func)dump_get_key_value_request,
|
||||
|
@ -2879,6 +2885,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
|
|||
(dump_func)dump_create_key_reply,
|
||||
(dump_func)dump_open_key_reply,
|
||||
(dump_func)0,
|
||||
(dump_func)0,
|
||||
(dump_func)dump_enum_key_reply,
|
||||
(dump_func)0,
|
||||
(dump_func)dump_get_key_value_reply,
|
||||
|
@ -3064,6 +3071,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
|
|||
"create_key",
|
||||
"open_key",
|
||||
"delete_key",
|
||||
"flush_key",
|
||||
"enum_key",
|
||||
"set_key_value",
|
||||
"get_key_value",
|
||||
|
|
Loading…
Reference in New Issue