Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Who owns the Windows Clipboard
Winsock: retrieving information from a host database for a given host name
Current System information
How to enumerate terminal servers within the specified Windows domain
Running a regular FoxPro form while main VFP window is minimized
Using GetNearestColor
Using IsChild() for testing ThisForm.ShowWindow property
Adding supplementary data to AVI files
An alternative way of setting Form.Closable to False
Copying files as a transacted operation (Vista)
How to retrieve version information for the specified file
Drawing a window caption using the DrawCaption routine
Enumerating MIDI output devices
GDI+: Storing DLL icon resources in image files
How to generate UUID values
Reading STARTUPINFO structure for the current VFP session
Winsock: initializing the service in the VFP application
Building a tree of subdirectories for a given path using FindFile functions
Retrieving geometrical parameters of the system desktop window
Saying "Hello World!" with VFP and WinAPI
How to test file attributes (key method for FileExists and DirectoryExists routines)
Setting and retrieving the double-click time for the mouse
Winsock: how to retrieve a service information corresponding to a service name
Creating two-byte hashes for a list of URLs
Retrieving the names of all sections in an initialization file

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
 
DO decl
 
LOCAL lnBufferSize, lcBuffer, lnReturn
lnBufferSize = 16384
lcBuffer = Repli(Chr(0), lnBufferSize)
 
*lnBufferSize = GetPrivateProfileSectionNames(@lcBuffer,;
                lnBufferSize, "c:\winnt\win.ini")
 
*lnBufferSize = GetPrivateProfileSectionNames(@lcBuffer,;
                lnBufferSize, "win.ini")
 
lnBufferSize = GetPrivateProfileSectionNames(@lcBuffer,;
                lnBufferSize, "c:\windows\desktop.ini")
 
*lnBufferSize = GetPrivateProfileSectionNames(@lcBuffer,;
                lnBufferSize, "c:\i386\display\disk_01\setup.ini")
 
lcBuffer = Left(lcBuffer, lnBufferSize) + Chr(0)
 
LOCAL ii, lcSubstr, ch
lcSubstr = ""
CREATE CURSOR csResult (section C(50))
 
FOR ii=1 TO lnBufferSize
    ch = SUBSTR(lcBuffer, ii,1)
    IF ch = Chr(0)
        IF Not Empty(lcSubstr)
            INSERT INTO csResult VALUES (m.lcSubstr)
            lcSubstr = ""
        ENDIF
    ELSE
        lcSubstr = lcSubstr + ch
    ENDIF
ENDFOR
 
SELECT csResult
GO TOP
BROWSE NORMAL NOWAIT
 
PROCEDURE  decl
    DECLARE INTEGER GetPrivateProfileSectionNames IN kernel32;
        STRING @lpszReturnBuffer, INTEGER nSize, STRING lpFileName
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
1074 bytes  
Created: 2002-01-15 20:07:44  
Modified: 2002-01-15 20:10:02  
Visits in 7 days: 83  
Listed functions:
GetPrivateProfileSectionNames
Printer friendly API declarations
My comment:
Calls to profile functions might be mapped to the registry instead of to the initialization files. That means when reading the Win.INI with this function, you may actually read the Windows Registry instead
Word Index links for this example:
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 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.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (23.22.252.150)
4 sec.Function: 'CallWindowProc'
48.45 min.Function: 'FindNextChangeNotification'
48.5 min.Function: 'mmioAscend'
Function group: 'Windows Multimedia'
48.55 min.Example: 'Using the IsWindowEnabled function'
8.59 hrs.Example: 'GDI+: saving image of FoxPro form to graphics file (BMP, GIF, JPG, PNG, TIF)'
 Example: 'Printing text on the client area of the main VFP window'
 Example: 'FindText -- the hopeless and useless Common Dialog'
15.68 hrs.Example: 'How to display the Print property sheet'
15.79 hrs.Function: 'WNetEnumResource'
18.02 hrs.Function: 'WNetGetProviderName'
Function group: 'Windows Networking'
Google
Advertise here!