Advantage Client Engine
Retrieve a property of a publication object from the data dictionary.
UNSIGNED32 ENTRYPOINT AdsDDGetPublicationProperty( ADSHANDLE hDictionary,
UNSIGNED8 *pucPublicationName,
UNSIGNED16 usPropertyID,
VOID *pvProperty,
UNSIGNED16 *pusPropertyLen );
hDictionary (I) |
A data dictionary connection. |
pucPublicationName (I) |
The name of a publication in the database. |
usPropertyID (I) |
Index of the property to retrieve. See Remarks for allowed values. |
pvProperty (O) |
Pointer to the buffer where the property is to be copied into. |
pusPropertyLen (I/O) |
On input, specifies the size of the buffer pointed to by pvProperty. On output, returns the length of the property copied into the buffer. |
AE_INVALID_PROPERTY_ID |
Either the value supplied in usPropertyID is not a valid publication property, or the specified property cannot be retrieved. |
AE_INSUFFICIENT_BUFFER |
The size of the property to be copied into pvProperty is larger than the buffer size specified by *pusPropertyLen. The required buffer length is returned in *pusPropertyLen when this error occurs. |
AE_PROPERTY_NOT_SET |
The requested property is not set in the data dictionary. No data is returned in pvProperty and *pusPropertylen. |
This function retrieves a property of the specified publication object from the data dictionary. The following are the valid values of usPropertyID and the expected return value in pvProperty and pusPropertyLen.
usPropertyID |
Description |
ADS_DD_COMMENT |
The comment for the publication. |
ADS_DD_PUBLICATION_OPTIONS |
The function returns a bit field of the options for the specified publication. This property is returned as a 4-byte integer in the buffer pointed to by pvProperty. pusPropertyLen must be 4 on input when calling this function with this property. The options are ORed together into the bit field. See AdsDDCreatePublication for additional information on the publication options. |
ADS_DD_USER_DEFINED_PROP |
The function returns the user defined publication property in pvProperty. The user-defined property is set, read, and interpreted by the application. It is not used by Advantage. |
usLen = sizeof( ulOptions );
ulRetVal = AdsDDGetPublicationProperty( hConn, "mypub",
ADS_DD_PUBLICATION_OPTIONS,
&ulOptions, &usLen );
See Also