API Syntax :
DWORD GetPrivateProfileSectionNames(
LPCTSTR lpszReturnBuffer,
DWORD nSize,
LPCTSTR lpFileName
);
Parameters :
lpszReturnBuffer - [out] buffer that receives the section names associated with the named file. The buffer is filled with one or more null-terminated strings; the last string is followed by a second null character
nSize - [in] The size of the buffer pointed to by the lpszReturnBuffer parameter, in characters.
lpFileName - [in] The name of the initialization file. If this parameter does not contain a full path to the file, the system searches for the file in the Windows directory.
Return Value : The return value specifies the number of characters copied to the specified buffer, not including the terminating null character. If the buffer is not large enough to contain all the section names associated with the specified initialization file, the return value is equal to the size specified by nSize minus two.
This function does not with QTP. this is because the returned string value is delimited with Null. so, QTP string are null terminated, so only the first string is returned, even that the buffer size is bigger.
Posted in Registry



daniva




Recent Comments