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. This function is obsolete. Use CeReadRecordPropsEx (EDB)instead when working with an EDB database.
Syntax
CEOID CeReadRecordProps( HANDLE hDbase, DWORD dwFlags, LPWORD lpcPropID, CEPROPID* rgPropID, LPBYTE* lplpBuffer, LPDWORD lpcbBuffer ); |
Parameters
- hDbase
-
[in] Handle to an open database.
- dwFlags
-
[in] Bitmask of read flags.
- lpcPropID
-
[in] Pointer to the number of property identifiers in the array specified by the rgPropIDparameter. If rgPropIDis set to NULL, this parameter receives the number of properties retrieved.
- rgPropID
-
[in] Pointer to an array of property identifiers for the properties to be retrieved. If this parameter is set to NULL, this function retrieves all properties in the record.
- lplpBuffer
-
[out] Pointer to a long pointer to a buffer that receives the requested properties.
If dwFlagsincludes the CEDB_ALLOWREALLOC flag, the buffer can be reallocated if necessary. If the CEDB_ALLOWREALLOC flag is specified and this parameter is set to NULL, the server uses the LocalAllocfunction to allocate a buffer of the appropriate size in the caller's address space and returns a pointer to the buffer.
If the CEDB_ALLOWREALLOC flag is specified, the value of this pointer can change, even on failure. For example, the old memory might be freed and the allocation might fail, leaving the pointer set to NULL.
- lpcbBuffer
-
[out] Pointer to a variable that contains the size, in bytes, of the buffer specified by lplpBuffer. When this function returns, lpcbBufferreceives a value that indicates the actual size of the data copied to the buffer. If the buffer was too small to contain the data, this parameter can be used to calculate the amount of memory to allocate for the buffer if CEDB_ALLOWREALLOC was not specified.
Return Value
The object identifier of the record from which the function read indicates success. Zero indicates failure. To get extended error information, call GetLastError. The following table shows possible values.
Return Value | Description |
---|---|
ERROR_INSUFFICIENT_BUFFER |
The specified buffer was not large enough, and the reallocation failed if the CEDB_ALLOWREALLOC flag was specified. The lpcbBufferparameter contains the required buffer size. |
ERROR_INVALID_PARAMETER |
Indicates one of the following:
|
ERROR_KEY_DELETED |
The record that was to be read was deleted by another thread. If the current record was reached as a result of an autoseek, this error is not returned, and the next record is returned. |
ERROR_NO_DATA |
None of the requested properties was found. The output buffer and size are valid. |
ERROR_NO_MORE_ITEMS |
The current seek pointer is at the end of the database. |
Remarks
When you use the this function to read properties in an EDB database, this function calls the EDB version of the CeReadRecordPropsExfunction, passing a value of NULL for the hHeap parameter.
Requirements
Header | windbase.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 5.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |