Using Win32 functions in Visual FoxPro Image Gallery
Registry
..msdn
GetPrivateProfileSectionNames
GetPrivateProfileString
GetProfileString
RegCloseKey
RegCreateKeyEx
RegDeleteKey
RegDeleteValue
RegEnumKey
RegEnumKeyEx
RegEnumValue
RegOpenKeyEx
RegQueryInfoKey
RegQueryValueEx
RegSaveKey
RegSetValueEx
SHEnumKeyEx
SHRegCloseUSKey
SHRegEnumUSKey
SHRegOpenUSKey
WritePrivateProfileSection
WritePrivateProfileString
Code examples:
Configuring DEVMODE structure for a printer
Displaying printer-properties Property Sheet for the specified printer
Enumerating forms supported by a specified printer
Enumerating print jobs and retrieving information for default printer (JOB_INFO_1 structures)
How to delete all print jobs for a printer
How to retrieve configuration data for a specified printer stored in the registry (PrinterDriverData key)
How to retrieve the number of print jobs queued for the printer
Printing text with the Escape function
Reading keys in the specified section of the Win.ini file
Retrieving default spooling directory name
Retrieving list of supported paper names (for example, Letter or Legal) for a given printer
Retrieving the name of the default printer for the current user on the local computer (Win NT/XP)
Simple printer queue monitor: deletes, pauses, resumes print jobs for local printer
GetProfileString
..msdn    Add comment     W32 Constants      Translate this page
Retrieves the string associated with a key in the specified section of the Win.ini file.
Code examples:
Printing text with the Escape function
Retrieving the name of the default printer for the current user on the local computer (Win NT/XP)
Configuring DEVMODE structure for a printer
How to retrieve the number of print jobs queued for the printer
Enumerating print jobs and retrieving information for default printer (JOB_INFO_1 structures)
Simple printer queue monitor: deletes, pauses, resumes print jobs for local printer
How to delete all print jobs for a printer
Enumerating forms supported by a specified printer
Displaying printer-properties Property Sheet for the specified printer
How to retrieve configuration data for a specified printer stored in the registry (PrinterDriverData key)
Declaration:
DWORD GetProfileString(
  LPCTSTR lpAppName,        // section name
  LPCTSTR lpKeyName,        // key name
  LPCTSTR lpDefault,        // default string
  LPTSTR lpReturnedString,  // destination buffer
  DWORD nSize               // size of destination buffer
);
FoxPro declaration:
DECLARE INTEGER GetProfileString IN kernel32;
    STRING   lpAppName,;
    STRING   lpKeyName,;
    STRING   lpDefault,;
    STRING @ lpReturnedString,;
    INTEGER  nSize
Parameters:
lpAppName
[in] Pointer to a null-terminated string that specifies the name of the section containing the key.

lpKeyName
[in] Pointer to a null-terminated string specifying the name of the key whose associated string is to be retrieved.

lpDefault
[in] Pointer to a null-terminated default string.

lpReturnedString
[out] Pointer to a buffer that receives the character string.

nSize
[in] Specifies the size, in TCHARs, of the buffer pointed to by the lpReturnedString parameter.
Return value:
The return value is the number of characters copied to the buffer, not including the null-terminating character.
Usage:
LOCAL cBuffer
cBuffer = REPLICATE(CHR(0), 120)

= GetProfileString("Windows", "Device", ",,,",;
    @cBuffer, LEN(cBuffer))

* return:
* \\myserver\HP LaserJet 4100 Series PS,winspool,Ne01:
My comment:
A section in the Win.ini file must have the following form:
[section]
key=string
Word Index links for the GetProfileString :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-09-04 12:00:00
Modified: 2010-05-19 17:05:41
Visited in last 7 days: 163
User Contributed Notes:
A.M. | 2001-10-01 09:33:30
MSDN: The Win32 functions for setting and retrieving initialization file (.ini) strings are limited to just under 32KB per read and per write on Windows 95/98.

This is true for the following functions:
  GetProfileString()
  WriteProfileString()
  GetPrivateProfileString()
  WritePrivateProfileString()

Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.163.210.170)
16 sec.Function: 'LocalAlloc'
31 sec.Function: 'GetSysColorBrush'
45 sec.Function: 'RasPhonebookDlg'
59 sec.Function: 'GetAdaptersInfo'
1.25 min.Function: 'CloseHandle'
1.52 min.Function: 'GetShellWindow'
1.75 min.Function: 'IcmpCloseHandle'
1.98 min.Function: 'GetSystemTimeAdjustment'
2.25 min.Function: 'InternetDial'
2.5 min.Function: 'GetCharABCWidths'
Google
Advertise here!