Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Finding the path to the VFP executable running
Reading keys in the specified section of the Win.ini file
Retrieving IP statistics for the computer
Generating random UUID values
How to obtain the number of rows affected by remote UPDATE, INSERT or DELETE statement
Pocket PC: creating backup for the System Registry
Retrieving System Error message strings
Retrieving window and menu help context identifiers
How to test file attributes (key method for FileExists and DirectoryExists routines)
Using the MessageBox Win32 function
Converting characters in a URL into corresponding escape sequences and backwards
Extended OS Version info
Retrieving list of supported paper names (for example, Letter or Legal) for a given printer
Retrieving the state of your Internet connection
Finding the application, icon and friendly names associated with a file name
High-powered ALLTRIM
How to display a dialog box with which the user can add a data source (DSN)
Retrieving the names of all sections in an initialization file
Using SQLBrowseConnect to connect to a data source through a number of iterative calls (SQL Server)
Retrieving country-specific dialing information from the Windows Telephony list of countries
Converting a decimal string to an integer
Returning some basic information for the specified INF file
Copying files as a transacted operation (Vista)
Saying "Hello World!" with VFP and WinAPI
Finding the path to the VFP executable running

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
DECLARE INTEGER GetModuleHandle IN kernel32;
    INTEGER lpModuleName

DECLARE INTEGER GetModuleFileName IN kernel32;
    INTEGER  hModule,;
    STRING @ lpFilename,;
    INTEGER  nSize

hModule = GetModuleHandle(0)
lpFilename = SPACE(250)

lnLen = GetModuleFileName (hModule, @lpFilename, Len(lpFilename))
? Left (lpFilename, lnLen)


User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
335 bytes  
Created: 2001-08-03 12:00:00  
Modified: 2011-02-16 07:03:31  
Visits in 7 days: 59  
Listed functions:
GetModuleFileName
GetModuleHandle
Printer friendly API declarations
My comment:
Depending on OS, VFP version running, and differently for run-time and command window mode you may get various results:

c:\vfp\vfp.exe
c:\winnt\system32\vfp300.esl
c:\Program Files\Microsoft Visual Studio\VFP98\VFP6.Exe
...

* * *
? _vfp.servername



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-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.156.92.243)
12 sec.Function: 'CryptUnprotectData'
Function group: 'Cryptography Reference'
23 sec.Function: 'mciSendCommand'
Function group: 'Windows Multimedia'
33 sec.Example: 'How to find which fonts Windows uses for drawing captions, menus and message boxes'
45 sec.Solutions
55 sec.Function: 'GetFileSizeEx'
Function group: 'File System'
1.1 min.Function: 'IsWow64Process'
Function group: 'Process and Thread'
1.3 min.Function: 'SetupDiGetClassImageListEx'
Function group: 'Setup API functions'
1.5 min.Example: 'How to print picture stored in enhanced-format metafile (*.emf)'
1.68 min.Solutions
1.87 min.Function: 'PlayEnhMetaFile'
Function group: 'Metafile'
Google
Advertise here!