Chat now with support
Chat with Support

InTrust 11.3 - InTrust SDK Reference

IProperty

Represents a property attached to an InTrust repository. A property is a way to tag repositories for arbitrary purposes.

Methods

PropertyName (setter)

Sets the name of the property.

Syntax

HRESULT PropertyName(
    [in] BSTR pVal
);

Parameter
Name Type Meaning

pVal

BSTR

Name of the property. The name must be unique in the property collection (see IPropertyCollection).

PropertyValue (getter)

Returns the value of the property.

Syntax

HRESULT PropertyValue(
    [out, retval] VARIANT *pVal
);

Parameter
Name Type Meaning

pVal

VARIANT*

Value of the property.

PropertyValue (setter)

Sets the value of the property.

Syntax

HRESULT PropertyValue(
    [in] VARIANT pVal
);

Parameter
Name Type Meaning

pVal

VARIANT

Value of the property.

PropertyName

Returns the name of the property.

NOTE: There is no setter method for the name of a property. Instead of renaming an existing property, you need to create a new one in the property collection (IPropertyCollection) and assign it the value you need. The old property can be deleted using the collection's Remove method.

Syntax

HRESULT PropertyName(
    [out, retval] BSTR *pVal
);

Parameter
Name Type Meaning

pVal

BSTR*

Name of the property.

IPropertyCollection

Represents a collection of properties associated with an InTrust repository. Access to the collections is gained through specialized methods of the IInTrustRepository interface (such as CustomAttributes and ForwardingProperties), which filter the available properties by purpose.

Methods

Item

Gets a property from the collection by name.

Syntax

HRESULT Item(
    [in] BSTR bstrPropertyName,
    [out, retval] IProperty** ppProperty
);

Parameters
Name Type Meaning

bstrPropertyName

BSTR

Name of the property. This name must exist in the collection.

ppProperty

IProperty**

The property.

_NewEnum

Constructs the collection.

Syntax

HRESULT _NewEnum(
    [out, retval] LPUNKNOWN* pVal
);

Parameters
Name Type Meaning

pVal

LPUNKNOWN*

Collection constructor.

Set

Sets the specified property if it exists or creates it if it doesn't.

Syntax

HRESULT Set(
[in] BSTR bstrPropertyName,
    [in] VARIANT varPropertyValue
);

Parameters
Name Type Meaning

bstrPropertyName

BSTR

Name of the property to add. The name must be unique.

varPropertyValue BSTR

The value to set.

Remove

Removes a property from the collection by name.

Syntax

HRESULT Remove(
    [in] BSTR bstrPropertyName
);

Parameter
Name Type Meaning

bstrPropertyName

BSTR

Name of the property to remove.

IRepositoryRecordInserter

Provides write access to the repository that it is associated with and manages one or more IRepositoryRecordInserterLight interfaces, which do the actual writing. For each IRepositoryRecordInserterLight, it also stores predefined field values that are the same in all records written by that IRepositoryRecordInserterLight.

Incoming records are pushed to the repository at regular intervals. However, you can force an immediate write by calling the Commit method.

Methods

BindFields

Sets the values of the path-specifying fields for records that will be written to the same repository file.

Syntax

HRESULT BindFields(

    [in] tags path,

    [out, retval] IRepositoryRecordInserterLight**

);

Parameters
Name Type Meaning

path

tags

The field record values that you specify here are supposed to be the same for all records generated by the IRepositoryRecordInserterLight that will be initialized.

 

IRepositoryRecordInserterLight**

Record-inserting interface with some record field values predefined.

PutRecords

Writes the specified records to the repository asynchronously.

Syntax

HRESULT PutRecords(

    [in] SAFEARRAY(struct record) records

);

Parameter
Name Type Meaning

records

SAFEARRAY(struct record)

Records to put in the repository.

PutRecords2

Writes the specified records to the repository asynchronously. This method is similar to PutRecords, except the type of the input parameter. Using the IBulkRecord interface for input makes it possible to write event records converted by IEventToRecordFormatter. For details, see Event Record Data Structures.

Syntax

HRESULT PutRecords2(

    [in] IBulkRecord* pBulkRecord

);

Parameter
Name Type Meaning

records

IBulkRecord* pBulkRecord

Records (normally, converted from events) to put in the repository.

Commit

Performs all deferred record writes synchronously.

Caution: This operation is resource-intensive and should not be used needlessly. For example, committing after each record is strongly discouraged. InTrust commits records automatically every 60 seconds.

Forcing a commit is acceptable in situations like the following:

  • You need to confirm that a batch of events or records has safely arrived in the repository.
  • You are writing events or records out of order. See the corresponding note in Writing Events.
Syntax

HRESULT Commit();

IRepositoryRecordInserterLight

Generates valid record structures from predefined and significant values and writes them to the repository.

Note:IRepositoryRecordInserterLight or IRepositoryRecordInserter: when to use which?

Use IRepositoryRecordInserterLight if you need to write large numbers of records with coinciding values in specific fields. Otherwise, using IRepositoryRecordInserter should be more efficient.

Method

PutRecords

Syntax

HRESULT PutRecords(

    [in] SAFEARRAY(struct contents) recordFields

);

Parameter
Name Type Meaning

recordFields

SAFEARRAY(struct contents)

Field value structures to convert to records. Missing fields will be filled in based on the tags structure instance associated with this IRepositoryRecordInserterLight.

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating