Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A version of this page is also available for
4/8/2010
This method reads properties from the current record of a database on a remote Windows Embedded CE–based device.
CEOID CeReadRecordPropsEx(
HANDLE hDbase,
DWORD dwFlags,
LPWORD lpcPropID,
CEPROPID * rgPropID,
LPBYTE * lplpBuffer,
LPDWORD lpcbBuffer,
HANDLE hHeap
);
dwFlags
[in] Specifies read flags. It is one of the following flags.
Value | Description |
---|---|
0 |
There are no special instructions for handling the read process. |
CEDB_ALLOWREALLOC |
The LocalAlloc function was used to allocate the buffer specified by the lplpBuffer parameter. The server can reallocate the buffer if it is not large enough to hold the requested properties. |
The object identifier of the record from which the function read indicates success. Zero indicates failureTo get extended error information, call IRAPISession::CeGetLastError and IRAPISession::CeRapiGetError. Possible values for IRAPISession::CeGetLastError include the following:
The IRAPISession::CeReadRecordPropsEx method reads the specified set of properties from the current record. If the dwFlags parameter of IRAPISession::CeOpenDatabaseEx is set to CEDB_AUTOINCREMENT, the function increments the seek pointer so that the next call reads the next record in the current sort order. If there was no active sort order when the database was opened, then the order in which records are returned is not predictable.
You should read all needed properties from the record in a single call. This is because the entire record is stored in a compressed format, and each time a property is read it must be decompressed. All the properties are returned in a single marshaled structure, which consists of an array of CEPROPVAL structures. There is one CEPROPVAL structure for each property requested or, if rgPropID is NULL, there is one for each property found.
If a property was requested, such as strings or Binary Large Objects (BLOBs) that are packed in at the end of the array, the pointers in the CEPROPVAL structures point into this marshaled structure. This means that the only memory that must be freed is the original pointer to the buffer passed in to the call. Even if the function fails, it may have allocated memory on the caller's behalf. You must free the pointer returned by this function if the pointer is not NULL.
Note
Earlier versions of Windows Embedded CE assigned object identifiers to objects in other file systems, such as the file allocation table (FAT) file system. These object identifiers were guaranteed to be unique within a volume, but not across multiple volumes. Effective with version 3.0, only objects in the object store have valid, unique object identifiers and the object store is the only volume that can return an object identifier.
Note
The IRAPISession::CeReadRecordProps function is obsolete and is replaced by this function.
Header | rapi2.h |
Library | ole32.lib, rapiuuid.lib |
Windows Embedded CE | Windows Embedded CE 6.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
IRAPISession
IRAPISession::CeOpenDatabaseEx
IRAPISession::CeWriteRecordProps
IRAPISession::CeReadRecordProps
Please sign in to use this experience.
Sign in