Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Reading VFP settings from the Windows Registry
URL: converting unsafe characters and spaces into escape sequences
Using GetSysColor
Drawing icons associated with the VFP main window
Finding parameters for the region specified
How to generate GUID values
List of addresses in the AutoDial mapping database
Retrieving graphic capabilities of default printer
Retrieving information about the specified icon
Animating a transition of the VFP form (a wire-frame rectangle)
How to perform Base64 encoding/decoding using Cryptography API Functions
How to read email messages using Simple MAPI
Playing WAV sounds simultaneously
Smart Card Database Query Functions
Clipping mouse cursor area
Converting path to original case
Enumerating print processors and supporting data types installed on the specified server
How to release and renew a lease on an IP address previously obtained through Dynamic Host Configuration Protocol (DHCP)
Retrieving graphic capabilities of your display
Retrieving the command line for the VFP session
Using the Semaphore object to allow only one instance of VFP application running
Writing to INI file
FindText -- the hopeless and useless Common Dialog
GDI+: printing vertical text on VFP reports via generated images (VFP9)
Converting command-line string to a set of Unicode argument strings (WinNT only)

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
 
DO decl
 
LOCAL lnCmdlinePtr, lnArrayPtr, lnParamCnt
lnCmdlinePtr = GetCommandLine()
lnParamCnt = 0
lnArrayPtr = CommandLineToArgvW(lnCmdlinePtr, @lnParamCnt)
 
IF lnArrayPtr = 0 Or lnParamCnt = 0
    ? "Error code returned:", GetLastError()
    RETURN
ENDIF
 
LOCAL lnArraySize, lcBuffer
lnArraySize = GlobalSize(lnArrayPtr)
lcBuffer = Repli(Chr(0), lnArraySize)
 
= CopyMemory (@lcBuffer, lnArrayPtr, lnArraySize)
= GlobalFree (lnArrayPtr)
 
* first DWORD (4 bytes) stores a pointer to data
* I assume that it is always a contiguous memory block
lcBuffer = SUBSTR(lcBuffer, 5)
? lcBuffer
 
PROCEDURE  decl
    DECLARE INTEGER GetLastError IN kernel32
    DECLARE INTEGER GetCommandLine IN kernel32
    DECLARE INTEGER GlobalSize IN kernel32 INTEGER hMem
    DECLARE INTEGER GlobalFree IN kernel32 INTEGER hMem
 
    DECLARE INTEGER CommandLineToArgvW IN shell32;
        INTEGER lpCmdLine, INTEGER @pNumArgs
 
    DECLARE RtlMoveMemory IN kernel32 As CopyMemory;
        STRING @Dest, INTEGER Source, INTEGER nLength
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
1015 bytes  
Created: 2001-12-11 19:47:38  
Modified: 2001-12-11 19:48:10  
Visits in 7 days: 96  
Listed functions:
CommandLineToArgvW
CopyMemory
GetCommandLine
GetLastError
GlobalFree
GlobalSize
Printer friendly API declarations
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 (50.19.155.235)
35.22 min.Example: 'Creating a folder'
Language: 'C#'
35.27 min.Function: 'FillMemory'
Function group: 'Memory Management'
1.52 hrs.Function: 'InitiateSystemShutdown'
 Example: 'How to block the ALT+TAB shortcut (WinXP)'
2.68 hrs.Example: 'Memory usage info for current VFP session (WinNT only)'
 Function: 'FillMemory'
3.39 hrs.Function: 'DragQueryFile'
Function group: 'Shell Functions'
 Example: 'Starting external program from VFP and waiting for its termination'
3.96 hrs.Example: 'Extensible Storage Engine class library'
4.88 hrs.Example: 'Winsock: changing the byte ordering'
Google
Advertise here!