Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Writing to INI file
How to obtain Content-Type value for a file type from the System Registry
Using the heap of the calling process to allocate memory blocks
Winsock: how to retrieve a service information corresponding to a port
Winsock: initializing the service in the VFP application
How to retrieve network parameters for the local computer (including Host name, Domain name, and DNS Server)
Testing serial ports
Customizing the frame of top-level form: removing the standard frame (VFP9, Vista)
Enumerating network resources
How to enumerate terminal servers within the specified Windows domain
How to Start a Process as Another User (NT/XP/2K)
Obtaining addresses for the adapters on the local computer (Win XP/2003/Vista)
Shortcut Menu Class
URL: splitting into its component parts
Class library providing access to the System Registry
GDI+: retrieving list of available image encoders and image decoders
Locking and unlocking file of a VFP table
Locking mouse and keyboard input for the VFP application
Placing an arbitrary rectangular area of main VFP window on the Clipboard
Simple MAPI: how to pick an email recipient from Outlook Express address book
Using Path functions from Shell Lightweight Utility APIs (shlapi.dll)
Adding and deleting User Accounts
Displaying standard progress dialog box when copying files
Enumerating data formats currently available on the clipboard
Using GetBinaryType (WinNT only) to determine the type of an executable 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
 
#DEFINE SCS_32BIT_BINARY   0
#DEFINE SCS_DOS_BINARY     1
#DEFINE SCS_WOW_BINARY     2
#DEFINE SCS_PIF_BINARY     3
#DEFINE SCS_POSIX_BINARY   4
#DEFINE SCS_OS216_BINARY   5
 
    DECLARE SHORT GetBinaryType IN kernel32;
        STRING    lpApplicationName,;
        INTEGER @ lpBinaryType
 
    DECLARE INTEGER GetModuleFileName IN kernel32;  
        INTEGER  hModule,;  
        STRING @ lpFilename,;  
        INTEGER  nSize  
 
    ? _binaryType (getVFPmodule())
    ? _binaryType ("c:\winnt\system32\win.com")
    ? _binaryType ("c:\winnt\system32\command.com")
    ? _binaryType ("c:\winnt\system32\Commdlg.dll")
    ? _binaryType ("c:\io.sys")
 
FUNCTION  _binaryType (lpApplicationName)
    LOCAL lpBinaryType
    lpBinaryType = 0
    IF GetBinaryType (lpApplicationName, @lpBinaryType) = 1
        RETURN lpBinaryType
    ELSE
        RETURN -1
    ENDIF
 
FUNCTION  getVFPmodule
    LOCAL lpFilename 
    lpFilename = SPACE(250)  
    lnLen = GetModuleFileName (0, @lpFilename, Len(lpFilename))  
RETURN Left (lpFilename, lnLen)  
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
1004 bytes  
Created: 2001-08-23 12:00:00  
Modified: 2001-09-28 16:45:34  
Visits in 7 days: 52  
Listed functions:
GetBinaryType
GetModuleFileName
Printer friendly API declarations
My comment:
WinNT only. Windows 95/98/Me: Unsupported.
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 (107.22.25.119)
3 sec.Function: 'GradientFill'
Function group: 'Bitmap'
2.44 hrs.Function: 'GetOpenFileName'
Function group: 'Common Dialog Box'
 Function: 'FrameRgn'
Function group: 'Region'
3.13 hrs.Function: 'CeFindFirstDatabaseEx'
Function group: 'Remote Application Programming (RAPI)'
 Example: 'How to print picture stored in enhanced-format metafile (*.emf)'
5.37 hrs.Function: 'RollbackTransaction'
 Function: 'TaskDialogIndirect'
7.1 hrs.Example: 'Converting path to original case'
9 hrs.Function: 'GetSysColorBrush'
 Examples
Page 5
Google
Advertise here!