Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Converting command-line string to a set of Unicode argument strings (WinNT only)
How to create a desktop shortcut (shell link)
How to enumerate terminal servers within the specified Windows domain
How to release and renew a lease on an IP address previously obtained through Dynamic Host Configuration Protocol (DHCP)
Locking the workstation
MapiSendMail class for Visual FoxPro application
Saving HKEY_LOCAL_MACHINE\\Software\\ODBC Registry Entries to an XML file
Retrieving IP statistics for the computer
Retrieving list of available disk drives
Converting an integer value to a hexadecimal string
Displaying Windows shell folders in TreeView control with Visual FoxPro FLL
Drawing icons associated with the VFP main window
Enumerating Processes -- WinNT
Using the DeleteFile
Comparing dimensions of the VFP main window with _SCREEN properties
Displaying printer-properties Property Sheet for the specified printer
Enumerating ODBC drivers available on the local computer
How to display the Print property sheet
Printing text on the client area of the main VFP window
Retrieving Printer Device Context using PrintDlg function
Using shared memory to exchange data between two FoxPro applications
Using the RestartDialog function -- restarting Windows
Adding supplementary data to AVI files
Changing pitch and speed of a wave file
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: 100  
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 (23.22.252.150)
7 sec.Function: 'GdipRemovePropertyItem'
Function group: 'GDI+ Image'
28.12 min.Function: 'GdipSetMatrixElements'
28.18 min.Function: 'SQLGetPrivateProfileString'
Function group: 'ODBC API'
1.05 hrs.Example: 'How to display a dialog box with which the user can add a data source (DSN)'
 Function: 'GdipCreatePen1'
6.82 hrs.Example: 'Storing screen shot of a form to bitmap file'
 Function: 'VirtualFreeEx'
9.94 hrs.Example: 'Validating URLs using moniker functions'
 Function: 'WinExec'
 Example: 'GDI+: Storing DLL icon resources in image files'
Google
Advertise here!