[ros-dev] Probelms with ZwOpenKey or RtlFormatCurrentUserKeyP ath?

Murphy, Ged (Bolton) MurphyG at cmpbatteries.co.uk
Wed Aug 2 16:00:50 CEST 2006


Timo Kreuzer wrote:

> This is the code:
> 
>   RtlFormatCurrentUserKeyPath(&CurrentUserKeyPath);
>   
>
InitializeObjectAttributes(&ObjectAttributes,&CurrentUserKeyPath,OBJ_CASE_IN
SENSITIVE,NULL,NULL);
>   Status = ZwOpenKey(&CurrentUserKeyHandle, KEY_READ, &ObjectAttributes);
> 
> And I always get Status == STATUS_OBJECT_NAME_NOT_FOUND

What makes you sure ZwOpenKey is failing, and not one of the functions above
it?
You should use error checking where nessesary.

Ged.




More information about the Ros-dev mailing list