Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Finding the path to the VFP executable running
Generating random UUID values
How to obtain Content-Type value for a file type from the System Registry
One more way to retrieve environment strings
Quering a waveform-audio input device
Retrieving the command line for the VFP session
The DetectAutoProxyUrl function identifies the auto-config script location
Converting a hexadecimal string to an integer
Converting characters in a URL into corresponding escape sequences and backwards
GDI+: Drawing a Pie Chart
GDI+: enumerating fonts installed on the system
Retrieving statistics for the TCP protocol running on the local computer
Another way to go online (it is not about choosing an ISP)
Disabling drawing in the VFP form
GDI+: cropping images
How to display the port-configuration dialog box for a port on the specified server
Obtaining Shell32.dll version
Retrieving Network Provider information
Setting the Window Region for a form
Storing the environment strings in cursor
Using the GetTempFileName
Winsock: how to retrieve the protocol information corresponding to a protocol number
Adding an ODBC data source with the SQLConfigDataSource; use automatic or interactive mode
Displaying standard progress dialog box when copying files
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: 43  
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-2018 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.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (50.19.34.255)
15 sec.Function: 'CeGetFileSize'
Function group: 'Remote Application Programming (RAPI)'
27 sec.Function: 'waveInClose'
Function group: 'Windows Multimedia'
37 sec.Function: 'LockResource'
48 sec.All Functions
58 sec.Function: 'AVIStreamGetFrameClose'
Function group: 'Windows Multimedia'
1.17 min.Function: 'getprotobynumber'
Function group: 'Windows Sockets 2 (Winsock)'
1.32 min.Function: 'PlayEnhMetaFile'
Function group: 'Metafile'
1.48 min.Function: 'CryptUnprotectData'
Function group: 'Cryptography Reference'
1.62 min.Function: 'CreateURLMonikerEx'
Function group: 'URL Monikers'
1.75 min.Function: 'DefWindowProc'
Function group: 'Window Procedure'
Google
Advertise here!