PrfQueryProfileString - Remarks

The call searches the profile for a key matching the name specified by the pszKey parameter under the application heading specified by the pszApp parameter. If the key is found, the corresponding string is copied. If the key does not exist, the default character string, specified by the pszDefault parameter, is copied.

If the enumerated application names exceed the available buffer space, the enumerated names are truncated, the enumerated list is not terminated with 2 bytes of zeros, and the ulLength parameter is set to the number of bytes copied into the pBuffer parameter. In this instance, the pszKey parameter is ignored.

Note: If the enumeration cannot be performed for any reason, the default character string is not copied.