NTSTATUS
CmpQueryKeyName(
  IN  PVOID Object,
  IN  BOOLEAN HasObjectName,
  OUT POBJECT_NAME_INFORMATION ObjectNameInfo,
  IN  ULONG Length,
  OUT PULONG ReturnLength,
  IN  KPROCESSOR_MODE Mode
  );

Routine Description:

    This routine interfaces to the NT Object Manager.  It is invoked when
    the object system wishes to discover the name of an object that
    belongs to the registry.

Arguments:

    Object - pointer to a Key, thus -> KEY_BODY.

    HasObjectName - indicates whether the object manager knows about a name
        for this object

    ObjectNameInfo - place where we report the name

    Length - maximum length they can deal with

    ReturnLength - supplies variable to receive actual length

    Mode - Processor mode of the caller

Return Value:

    STATUS_SUCCESS

    STATUS_INFO_LENGTH_MISMATCH