Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Enumerating Processes -- Win9*
Hiding mouse cursor
How to drag a Form not using its Titlebar or Caption
Obtaining MAC address through Address Resolution Protocol (ARP) request
Winsock: retrieving information from a host database for a given host name
Using an Event Object. Part A: running an application that creates an Event object
Using LoadLibrary
Who owns the Windows Clipboard
Running a regular FoxPro form while main VFP window is minimized
Saving available locale records into a cursor
Retrieving information about all users currently logged on to the workstation (WinNT only)
Winsock: how to retrieve a service information corresponding to a service name
Winsock: initializing the service in the VFP application
Building a tree of subdirectories for a given path using FindFile functions
Pocket PC: System Registry Viewer
Reading Internet Query options
Retrieving graphic capabilities of default printer
Current System information
Using the Semaphore object
How to play a waveform sound (a WAV file in particular)
How to test file attributes (key method for FileExists and DirectoryExists routines)
Memory usage info for current VFP session (WinNT only)
Reading current hardware profile
Saying "Hello World!" with VFP and WinAPI
Pocket PC: creating new database in the Object Store and copying Contacts Database records into it

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
Before you begin:
Start ActiveSync and establish connection with your Pocket PC before the testing.

The code is based on base RAPI Database class and on custom RAPI Database class for operating with the Object Store Databases. Download both class modules prior to testing this code.
 
SET PROCEDURE TO clsRapi ADDITIVE
SET PROCEDURE TO clsRapiDb ADDITIVE
 
PRIVATE oRapi As TrapiDb
oRapi = CREATEOBJECT("TrapiDb")
 
IF NOT oRapi.Connected
    = MESSAGEBOX("Mobile device is unavailable.     ", 48, "Error")
    RETURN
ENDIF
 
LOCAL cDbname, dbsrc As RapiDatabase, dbdst As RapiDatabase,;
    nIndex, oProp As RecProperty, nRecordOid
 
cDbname="dbContactsCopy"
 
WITH oRapi.databases
    * re-creates empty database
    .DeleteDatabase(m.cDbname)
    .CreateDatabase(m.cDbname)
 
    dbsrc = .GetDatabase("Contacts Database")
    dbdst = .GetDatabase(m.cDbname)
ENDWITH
 
IF NOT dbsrc.OpenDatabase()
    = MESSAGEBOX("Error code:" +;
        TRANSFORM(dbsrc.errorcode) + ".     " + CHR(13) +;
        "Could not open source database.     ", 48, "Error")
    RETURN
ENDIF
IF NOT dbdst.OpenDatabase()
    = MESSAGEBOX("Error code:" +;
        TRANSFORM(dbsrc.errorcode) + ".     " + CHR(13) +;
        "Could not open target database.     ", 48, "Error")
    RETURN
ENDIF
 
* copying each property of each record in the source database
* to the target database
FOR nIndex=0 TO dbsrc.dbreccount-1
    dbsrc.goto(nIndex)
 
    * initial zero value of the record oid
    * causes the system to create new record
    nRecordOid=0
    FOR EACH oProp IN dbsrc.props
        = dbdst.WriteProp(@nRecordOid, oProp)
    NEXT
NEXT
dbsrc.CloseDatabase
dbdst.CloseDatabase
 
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
1334 bytes  
Created: 2004-08-23 13:32:00  
Modified: 2009-02-15 19:32:38  
Visits in 7 days: 54  
Listed functions:
Printer friendly API declarations
My comment:


#kwd: sln_pocketpc.
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: 'GetComputerObjectName'
Function group: 'System Information'
6 sec.Example: 'GDI+: Creating thumbnails to preview images in a directory'
8.03 hrs.Example: 'Comparing dimensions of the VFP main window with _SCREEN properties'
 Example: 'Displaying printer-properties Property Sheet for the specified printer'
8.96 hrs.Example: 'Sending a standard message with one or more attached files using default email client'
17.1 hrs.Example: 'Verifying a file using the Authenticode policy provider'
 Function: 'GdipSetPageScale'
Function group: 'GDI+ Graphics'
17.32 hrs.Example: 'Starting a dialog box for connecting to network resources (mapping network drive)'
 Example: 'Hiding mouse cursor'
1 day(s)Function: 'NetUserDel'
Function group: 'Network Management'
Google
Advertise here!