Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Shortcut Menu Class
Using the heap of the calling process to allocate memory blocks
Creating a device context for the specified printer
Displaying standard progress dialog box when copying files
Enumerating files opened on the network
GetFocus returns a HWND value
How to empty the Recycle Bin
Retrieving list of Global Atom names
Retrieving Printer Device Context using PrintDlg function
Validating the heap of the calling process
Adding an ODBC data source with the SQLConfigDataSource; use automatic or interactive mode
Drawing cursors for the classes defined by the system (preregistered): BUTTON, EDIT, LISTBOX etc.
GDI+: printing image file
How to retrieve adapter information for the local computer (including MAC address)
Loading a string resource from an executable file
Uploading file to the FTP server using InternetWriteFile
Creating the Save dialog box to specify the drive, directory, and name of a file to save
How to obtain Content-Type value for a file type from the System Registry
Simple Window Viewer
Using FillMemory
Using mailslots to send messages on the network
Comparing dimensions of the VFP main window with _SCREEN properties
Converting a hexadecimal string to an integer
Enumerating network interfaces on the local computer
Obtaining Shell32.dll version

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 DllGetVersion IN shell32 STRING @pdvi
 
*|typedef struct _DllVersionInfo {
*|    DWORD  cbSize;            0:4
*|    DWORD  dwMajorVersion;    4:4
*|    DWORD  dwMinorVersion;    8:4
*|    DWORD  dwBuildNumber;    12:4
*|    DWORD  dwPlatformID;     16:4
*|} DLLVERSIONINFO; total bytes = 20
 
#DEFINE NOERROR  0
#DEFINE DLLVER_PLATFORM_WINDOWS  1
#DEFINE DLLVER_PLATFORM_NT       2
 
LOCAL lcBuffer
lcBuffer = Chr(20) + Repli(Chr(0), 19)
 
IF DllGetVersion (@lcBuffer) = NOERROR
    ? "*** Shell32.dll"
    ? "Major version:", buf2dword(SUBSTR(lcBuffer, 5,4))
    ? "Minor version:", buf2dword(SUBSTR(lcBuffer, 9,4))
    ? "Build number: ", buf2dword(SUBSTR(lcBuffer, 13,4))
    ? "Platform:     ", Iif(buf2dword(SUBSTR(lcBuffer, 17,4))=1,;
        "Windows", "WinNT")
ENDIF
 
FUNCTION  buf2dword (lcBuffer)
RETURN Asc(SUBSTR(lcBuffer, 1,1)) + ;
    BitLShift(Asc(SUBSTR(lcBuffer, 2,1)),  8) +;
    BitLShift(Asc(SUBSTR(lcBuffer, 3,1)), 16) +;
    BitLShift(Asc(SUBSTR(lcBuffer, 4,1)), 24)
 
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
1005 bytes  
Created: 2002-04-16 22:19:26  
Modified: 2003-10-15 08:28:34  
Visits in 7 days: 116  
Listed functions:
DllGetVersion
Printer friendly API declarations
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.21.186.38)
8.11 hrs.Example: 'Uploading file to the FTP server using InternetWriteFile'
 Example: 'Using shared memory to exchange data between two FoxPro applications'
13.05 hrs.Function: 'RtlCompressBuffer'
Function group: 'Data Decompression Library'
 Example: 'Storing screen shot of a form to enhanced metafile (*.emf)'
13.89 hrs.Function: 'LsaClose'
Function group: 'Security'
13.9 hrs.Example: 'Storing content of the Clipboard to a bitmap file'
 Function: 'mixerGetControlDetails'
Function group: 'Windows Multimedia'
19.53 hrs.Example: 'Winsock: reading email messages (POP3, port 110)'
 Example: 'Drawing cursors for the classes defined by the system (preregistered): BUTTON, EDIT, LISTBOX etc.'
 Example: 'Simple Window Viewer'
Google
Advertise here!