Share via


CEPROPSPEC (EDB) (Windows Embedded CE 6.0)

1/6/2010

This structure contains information for the specified property. The structure is used when calling the CeCreateDatabaseWithProps (EDB) and CeAddDatabaseProps (EDB) functions to define new database properties. The structure is also used with the CeGetDatabaseProps (EDB) function.

Syntax

typedef struct CEPROPSPEC {
  WORD wVersion;
  CEPROPID propid;
  DWORD dwFlags;
  LPWSTR pwszPropName;
  DWORD cchPropName;
} CEPROPSPEC;

Members

  • wVersion
    Version of this structure. Must be set to 1.
  • propid
    The property ID.
  • dwFlags
    One or a combination of the following flags.

    Flag Description

    DB_PROP_COMPRESSED

    Specifies that this property is stored compressed. This flag applies only to properties of the type CEVT_STREAM. Using it with other properties generates an error. A stream that was marked as compressed is inaccessible with the stream APIs. Use the CeReadRecordPropsEx (EDB) function instead.

    DB_PROP_NOTNULL

    Specifies that the property must contain a value and cannot be set to NULL. This flag must be specified if the property is included in a sort order that is defined as a primary key.

  • pwszPropName
    Optional name for a property. If a name is not specified, an internal name is generated.

    When you call the CeGetDatabaseProps (EDB) function, you must pre-allocate space for the property names by setting this field to an empty string buffer.

  • cchPropName
    Size of the optional property name. The maximum size, not including the terminating NULL, is CEDB_MAXDBASENAMELEN (128).

Sample

The following code sample is one way to initialize the the members of this structure:

for (int loop=0;loop<numProps;loop++)
{
   propArray[loop].wVersion=CEPROPSPEC_VERSION;
   propArray[loop].pwszPropName = new WCHAR[XXX]; // rr
   propArray[loop]. cchPropName= XXX; // Need to specify the length of buffer we are passing in for pwszPropName.
}

Requirements

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

See Also

Reference

EDB Structures
CeCreateDatabaseWithProps (EDB)
CeAddDatabaseProps (EDB)
CeGetDatabaseProps (EDB)
CeReadRecordPropsEx (EDB)