PrfQueryProfileSize

Syntax
PrfQueryProfileSize( hini, pszAppName, pszKeyWord, pulDataSize )

Parameters

 * HINI hini (input)
 * Handle to profile to be searched for data. This may be one of the following:


 * PSZ pszAppName (input)
 * Pointer to a null-terminated string that holds the application name to search for within the profile. This parameter may be:


 * PSZ pszKeyWord (input)
 * Pointer to a null-terminated string that holds the keyword name to search for within the application name specified. This parameter may be: {| border="1"


 * NULL
 * Specifying NULL for this parameter will return, in pulDataSize, the number of bytes need to store an enumerated list of all the keywords in this profile. If NULL is specified for pszAppName, this parameter is ignored. See PrfWriteProfileString for more information on retrieving this list.
 * a variable
 * This is a specific case-sensitive keyword to search for.
 * }
 * PULONG pulDataSize (output)
 * Pointer to an unsigned long that will store, upon return, the number of bytes that will be required to store the data associated with the application/keyword pair in the specified profile. If either pszAppName or pszKeyWord is NULL, then this will have the number of bytes needed to store an enumerated list.
 * Pointer to an unsigned long that will store, upon return, the number of bytes that will be required to store the data associated with the application/keyword pair in the specified profile. If either pszAppName or pszKeyWord is NULL, then this will have the number of bytes needed to store an enumerated list.

Returns

 * BOOL bRC
 * This return value is always either:


 * TRUE
 * Success


 * FALSE
 * Error occurred. If FALSE, you may use WinGetLastError to find out what went wrong. Possible errors PrfQueryProfileData may incur:

Include Info
or or
 * 1) define INCL_WINSHELLDATA
 * 1) define INCL_WIN
 * 1) define INCL_PM
 * 2) include 

Usage Explanation
Use this function if you aren't sure how much space the data in a profile will take up, and then allocate memory based on PrfQueryProfileSize's return values.

Gotchas
Both the application name and the keyword are CASE SENSITIVE. It is recommended that all your references to these strings come from a single source, such as a #define or a global variable, so as not to get tripped up on this.