Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Adding and deleting Scheduled Tasks using NetScheduleJob API functions
Custom GDI+ class
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Converting Unicode data from the Clipboard to a character string using a given code page
Establishing connection using the SQLDriverConnect
Custom FTP Class for Visual FoxPro application
Detecting changes in connections to removable drives (VFP9)
Winsock: sending email messages (SMTP, port 25)
How to create non-blocking Winsock server
Splash Screen for the VFP application
How to print a bitmap file
GDI+: copying to the Clipboard (a) image of active FoxPro window/form, (b) image file
Custom HttpRequest class (WinHTTP)
Peer-to-peer LAN messenger built with Mailslot API functions
Custom HttpRequest class (WinINet)
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
How to activate Windows Calculator
Sending email messages with Simple MAPI
How to create MD-5 and SHA-1 hash values from a string
Enumerating data formats currently available on the clipboard
How to put a vertical text scrolling on the form (a movie cast)
Displaying animated images on FoxPro form with BitBlt and StretchBlt functions
Displaying bitmap using the AlphaBlend function
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: 146  
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 (107.21.186.38)
3 sec.Function: 'SQLGetInfo'
Function group: 'ODBC API'
5.03 hrs.Example: 'Custom GDI+ class'
 Function: 'WinVerifyTrust'
Function group: 'Cryptography Reference'
13.05 hrs.Example: 'Winsock: retrieving Web pages using sockets (HTTP, port 80)'
 
Function group: 'Pipe'
15.54 hrs.Function: 'GdipGetImageHeight'
Function group: 'GDI+ Image'
16.69 hrs.Function: 'GdiSetBatchLimit'
 Function: 'TerminateProcess'
17.23 hrs.Function: 'IsWindow'
 Example: 'How to prevent users from accessing the Windows Desktop and from switching to other applications'
Google
Advertise here!