Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.88 KB

File metadata and controls

60 lines (40 loc) · 1.88 KB

Home

Function name : GetPrivateProfileSectionNames

Group: Registry - Library: kernel32


The GetPrivateProfileSectionNames function retrieves the names of all sections in an initialization file.


Code examples:

Retrieving the names of all sections in an initialization file

Declaration:

DWORD GetPrivateProfileSectionNames(
  LPTSTR lpszReturnBuffer,  // return buffer
  DWORD nSize,              // size of return buffer
  LPCTSTR lpFileName        // initialization file name
);  

FoxPro declaration:

DECLARE INTEGER GetPrivateProfileSectionNames IN kernel32;
	STRING  @ lpszReturnBuffer,;
	INTEGER   nSize,;
	STRING    lpFileName
  

Parameters:

lpszReturnBuffer [out] Pointer to a buffer that receives the section names associated with the named file.

nSize [in] Specifies the size, in TCHARs, of the buffer pointed to by the lpszReturnBuffer parameter.

lpFileName [in] Pointer to a null-terminated string that specifies the name of the initialization file.


Return value:

The return value specifies the number of characters copied to the specified buffer, not including the terminating null character.


Comments:

This function is provided only for compatibility with 16-bit Windows-based applications. Applications should store initialization information in the registry.

Calls to profile functions might be mapped to the registry instead of to the initialization files. When the operation has been mapped, the GetPrivateProfileSectionNames function retrieves information from the registry, not from the initialization file; the change in the storage location has no effect on the function"s behavior.