RAPI Functions
A version of this page is also available for
4/8/2010
Before you can invoke any RAPI functions, you must initialize the underlying communications layer between the host computer and the Windows Embedded CE-based device, which must be connected to the host computer through a cable or a cradle. There are two versions of the RAPI initialization function you can use: CeRapiInit and CeRapiInitEx. CeRapiInit does not return until the connection is made, an error occurs, or another thread calls CeRapiUninit.
CeRapiInitEx works slightly differently. Instead of blocking the calling thread, it returns an event handle to indicate when initialization is complete. Use CeRapiInitEx to avoid blocking a thread inside a call to CeRapiInit. CeRapiInitEx returns immediately and continues initialization until the connection is made, until an error occurs, or until there is a call to CeRapiUninit. When CeRapiInitEx is complete, it sets the event specified in the heRapiInit member of the RAPIINIT structure. After calling CeRapiInitEx, check the return value to determine whether an error occurred. If the call was initially successful, call the MsgWaitForMultipleObjects function to wait for the event handle passed back in the heRapiInit member of the RAPIINIT structure. When the event is set, check the hrRapiInit member of the RAPIINIT structure to determine whether the connection was successful. To shut down or to stop the connection process, call the CeRapiUnInit function.
The following table shows the complete set of Remote API (RAPI) functions.
Function | Description |
---|---|
Compares a specified string to the system password. |
|
Closes an open object handle. |
|
Copies an existing file to a new file. |
|
Creates a new database. |
|
Creates a new database in the object store or in amounted volume. |
|
Creates a new directory. |
|
Creates, opens, or truncates a file, pipe, communications resource, disk device, or console. Returns a handle that can be used to access the object. Opens and returns a handle to a directory. |
|
Runs a new program. Creates a new process and its primary thread. The new process executes the specified executable file. |
|
Removes a database from the object store. |
|
Removes a database from the object store or a mounted database volume. |
|
Deletes an existing file from the object store. |
|
Deletes a record from a database. |
|
Enumerates all mounted database volumes and returns the name for each. |
|
Retrieves information about all databases of a given type residing on the Windows Embedded CE device. Also, copies information to an array of CEDB_FIND_DATA structures. |
|
Retrieves information about all files and directories in the given directory of the Windows Embedded CE object store. Also, copies information to an array of CE_FIND_DATA structures. |
|
Closes the specified search handle. The CeFindFirstFile and CeFindNextFile functions use the search handle to locate files with names that match a specified name. |
|
Opens an enumeration context to enable an application to enumerate all databases in the object store. |
|
Opens an enumeration context for all databases in a database volume. |
|
Searches a directory for a file whose name matches the specified file name. CeFindFirstFile examines subdirectory names in addition to file names. |
|
Retrieves the next database in an enumeration context. |
|
Retrieves the next database in an enumeration context. |
|
Continues a file search from a previous call to the CeFindFirstFile function. |
|
Flushes information from a database volume to permanent storage. |
|
Retrieves the name of the class to which the specified window belongs. |
|
Retrieves device-specific information about a specified device. |
|
Retrieves the amount of space on a disk volume on a remote Windows Embedded CE–based device. |
|
Returns attributes for a specified file or directory. |
|
Retrieves the size, in bytes, of the specified file. |
|
Retrieves the date and time that a file was created, last accessed, and last modified. |
|
Returns the calling thread's last-error code value. |
|
Gets the path to a special shell folder. |
|
Fills in a STORE_INFORMATION structure with the size of the object store and the amount of free space currently in the object store. |
|
Returns information about the current system. |
|
Retrieves the dimensions, widths, and heights of Windows display elements and system configuration settings. |
|
Retrieves the power status of the system. |
|
Gets the path to the directory designated for temporary files. |
|
Obtains extended information about the version of the operating system that is currently running. |
|
Retrieves the handle to a window that has the specified relationship to the specified window. |
|
Retrieves information about the specified window. Also retrieves the 32-bit (long) value at the specified offset into the extra window memory of a window. |
|
Copies the text of the specified window's title bar — if it has one — into a buffer. If the specified window is a control, the text of the control is copied. |
|
Gets information on the physical and virtual memory of the system. |
|
Issues a mount request for a database volume that contains both data and an integrity log. Also, returns a CEGUID that is the globally unique identifier(GUID) of a mounted database. |
|
Renames an existing file or a directory, including all its children. |
|
Retrieves information about an object in the object store. |
|
Retrieves information about an object in the object store or a mounted database volume. |
|
Opens an existing database. |
|
Opens an existing database on any database volume, including mounted databases. |
|
This function queries a Windows Embedded CE-based device to determine whether it supports the specified processor-specific instruction set. |
|
Frees the memory on the desktop computer allocated by a call to CeFindAllDatabases, CeFindAllFiles, or CeReadRecordProps. |
|
Reports remote API related failures, and can be used to determine whether a call failed due to a failure in the remote API. |
|
Attempts to initialize the Windows Embedded CE remote application-programming interface. |
|
Attempts to initialize the Windows Embedded CE remote application-programming interface and initially returns an event handle. |
|
Can be used as a general-purpose mechanism to remotely execute a routine. |
|
Uninitializes the Windows Embedded CE remote application-programming interface. |
|
Reads data from a file, starting at the position indicated by the file pointer. |
|
Reads properties from the current record. |
|
Reads properties from the current record. |
|
Releases the handle of the specified key. |
|
Creates the specified key. If the key already exists in the registry, the function opens it. |
|
Deletes a named subkey from the specified registry key. The subkey to be deleted cannot have any subkeys. |
|
Removes a named value from the specified registry key. |
|
Enumerates subkeys of the specified open registry key. |
|
Enumerates the values for the specified open registry key. Also, copies one indexed value name and data block for the key each time it is called. |
|
Opens the specified key. |
|
Retrieves information about a specified registry key. |
|
Retrieves the type and data for a specified value name that is associated with an open registry key. |
|
Stores data in the value field of an open registry key. It can also set additional value and type information for the specified key. |
|
Deletes an existing empty directory. |
|
Seeks the specified record in an open database. |
|
Sets various database parameters, including the name, type, and sort-order descriptions. |
|
Sets various database parameters, including the name, type, sort-order descriptions, and compression of the database. |
|
Moves the end-of-file position for the specified file to the current position of the file pointer. |
|
Sets a file's attributes. |
|
Moves the file pointer of an open file. |
|
Sets the date and time that a file was created, last accessed, or last modified. |
|
Creates a shortcut. |
|
Retrieves the shortcut's target path. |
|
Begins synchronization between a desktop and a remote Windows Embedded CE–based device. |
|
Stops synchronization between a desktop and a remote Windows Embedded CE–based device. |
|
Unmounts a database volume. |
|
Writes data to a file. It starts writing data to the file at the position indicated by the file pointer. |
|
Writes a set of properties to a single record, creating the record if necessary. |
|
Used to create a RAPI extension on a Windows Embedded CE function. |