Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to display advanced Task Dialog (Vista)
How to position the GETPRINTER() dialog
Printing text on the client area of the main VFP window
Retrieveing information about the active window (even if it is not owned by the calling process)
Validating URLs using moniker functions
Winsock: changing the byte ordering
Winsock: retrieving information from a host database for a given host name
Winsock: retrieving the host information corresponding to a network address
List of addresses in the AutoDial mapping database
Reading VFP settings from the Windows Registry
Retrieving graphic capabilities of default printer
Retrieving information about the specified icon
Winsock: how to retrieve the protocol information corresponding to a protocol name
Animating a transition of the VFP form (a wire-frame rectangle)
Drawing icons associated with the VFP main window
How to hide your program from the Close Program dialog (Win9* only)
How to read email messages using Simple MAPI
Obtaining MAC address through Address Resolution Protocol (ARP) request
Retrieving IP statistics for the computer
Smart Card Database Query Functions
The window and its ancestors
Finding parameters for the region specified
URL: converting unsafe characters and spaces into escape sequences
Clipping mouse cursor area
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: 96  
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 (54.224.75.101)
1.05 hrs.Function: 'InternetAutodial'
 Function: 'AVIFileRelease'
 Example: 'Using the CopyFile'
2.56 hrs.Example: 'Custom GDI+ class'
3.08 hrs.Function: 'MAPISendMail'
Function group: 'Simple MAPI'
3.09 hrs.Function: 'AVIFileInit'
Function group: 'Windows Multimedia'
 Function: 'GdipCreateHICONFromBitmap'
Function group: 'GDI+ Bitmap'
9.59 hrs.Example: 'Retrieving configuration information for the specified server (Win2000/XP)'
 Example: 'Who owns the Windows Clipboard'
 Example: 'How to put a horizontal text scrolling on the form (a news line)'
Google
Advertise here!