220.127.116.11 EvtRpcGetClassicLogDisplayName (Opnum 28)
The EvtRpcGetClassicLogDisplayName (Opnum 28) method obtains a descriptive name for a channel.
error_status_t EvtRpcGetClassicLogDisplayName( [in] RPC_BINDING_HANDLE binding, [in, range(1, MAX_RPC_CHANNEL_NAME_LENGTH), string] LPCWSTR logName, [in] LCID locale, [in] DWORD flags, [out] LPWSTR* displayName );
binding: An RPC binding handle as specified in section 2.2.21.
logName: The channel name for which the descriptive name is needed.
flags: A 32-bit unsigned integer that MUST be set to one of the following values:
If a locale is specified, that locale will be used and no fallback locale will be attempted if the locale is not present.
If set, instructs the server to pick the best locale, if the locale specified by the locale parameter is not present. Please see the following processing rules for more information on how the server picks the best locale.
displayName: Returned display name.
Return Values: The method MUST return ERROR_SUCCESS (0x00000000) on success; otherwise, it MUST return an implementation-specific nonzero value as specified in [MS-ERREF].
In response to this request from the client, for a successful operation, the server MUST attempt to retrieve a display name for a channel. In [MS-EVEN] section 18.104.22.168, there are two configuration entries for a classic event log: DisplayNameFile and DisplayNameID. The server tries to use the log name passed here to find the log entry in the registry and then locate the DisplayNameID and DisplayNameFile. The DisplayNameID is the message ID for the display name. The file which is pointed at by DisplayNameFile contains the localized string for the display name. The server uses the messageId and locale as the combination key to look for the string inside the file and then retrieve the classic event log display name. The server verifies that the channel name, as specified by the logName parameter, is a known classic event log. If the logName parameter does not specify a registered event log (the log name can't be located in the registry described in [MS-EVEN]), the server MUST fail the method with the error ERROR_NOT_FOUND (0x00000490). If the server can't find the DisplayNameID or the DisplayNameFile, the server SHOULD fail the method with the error ERROR_INVALID_DATA (0x0000000D).
If the locale is not specified (that is, the caller passes zero for the locale parameter) and the flags parameter is 0x0, the server MUST substitute the locale of its own execution thread as the value of the locale parameter.
If the display name is not present in the specified locale as specified above and the flags parameter is set to 0x100, the server makes a best effort attempt to find a localized display name string by following these steps:
The server SHOULD attempt to find a fallback locale with the same base language which does contain the localized display name.<65> For example, if the caller requested the U.S. English "en-US" locale but the display name was only available in another "en" prefixed locale such as the British English "en-GB" locale, the server would return the British English version of the display name.
Using the fallback locale, the server SHOULD attempt to find a localized display name string by searching the appropriate DisplayNameFile in the same manner as specified above.
If the server cannot determine an appropriate fallback locale or cannot find a localized display name string using the fallback locale, the server MUST return ERROR_NOT_FOUND (0x00000490).
The server SHOULD validate the flags to ensure that no flags are present other than 0x0 and 0x100.<66>
Otherwise, the server MUST fail the method with the error ERROR_INVALID_PARAMETER (0x00000057).
This API only succeeds if called for a log name that is exposed by the obsolete Eventlog Remote protocol. If called on logs that are not exposed by the obsolete Eventlog Remote protocol, the method will fail with the error ERROR_NOT_FOUND (0x00000490). For more information, see section 22.214.171.124.
The server MUST return a value indicating success or failure for this operation.