次の方法で共有


CeReadRecordProps (EDB) (Windows Embedded CE 6.0)

1/6/2010

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.

    The database must have been opened by a previous call to the CeOpenDatabaseEx2 (CEDB) function.**

  • dwFlags
    [in] Bitmask of read flags.
  • lpcPropID
    [in] Pointer to the number of property identifiers in the array specified by the rgPropID parameter. If rgPropID is 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 dwFlags includes 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 LocalAlloc function 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, lpcbBuffer receives 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 lpcbBuffer parameter contains the required buffer size.

ERROR_INVALID_PARAMETER

Indicates one of the following:

  • The lpcPropID parameter is set to NULL.
  • The lplpBuffer parameter is set to NULL.
  • The lpcbBuffer parameter is set to NULL.

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 CeReadRecordPropsEx function, passing a value of NULL for the hHeapparameter.

Requirements

Header windbase.h
Library coredll.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

EDB Functions
CeReadRecordPropsEx (EDB)
CeReadRecordProps (CEDB)