Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function reads properties from the current record. CeReadRecordPropsEx (RAPI)is a remote application interface, which enables an application running on a desktop computer to make function calls on a Windows CE–based device.
CEOID CeReadRecordPropsEx ( HANDLE hDbase , DWORD dwFlags , LPWORD lpcPropID , CEPROPID * rgPropID , LPBYTE * lplpBuffer , LPDWORD lpcbBuffer , HANDLE hHeap );
Parameters
Value | Description |
---|---|
0 | There are no special instructions for handling the read process. |
CEDB_ALLOWREALLOC | The LocalAllocfunction was used to allocate the buffer specified by the lplpBufferparameter. The server can reallocate the buffer if it is not large enough to hold the requested properties. |
Return Values
The object identifier of the record from which the function read indicates success. Zero indicates failure. To get extended error information, call CeGetLastError. Possible values for GetLastErrorinclude the following:
Remarks
The CeReadRecordPropsEx (RAPI)function reads the specified set of properties from the current record. If the dwFlagsparameter of CeOpenDatabaseEx (RAPI)was 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 CEPROPVALstructures. There is one CEPROPVALstructure for each property requested or, if rgPropIDis 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 CEPROPVALstructures 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.
Requirements
Runs On | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.10 and later | Rapi.h |
See Also
CeGetLastError, CeOpenDatabaseEx (RAPI), CEPROPVAL, CeSeekDatabase (RAPI), LocalAlloc