Gets the number of objects stored in the backup storage, and their IDs.
The current KAV SDK version does not contain implementation of this function for Linux-based solutions.
Depending on the value of the pqwObjectIds parameter of the function, it performs the following actions:
pqwObjectIds is NULL, the kaveQBGetIds function retrieves the total number of objects in the backup storage and writes it to *pCount.pqwObjectIds points to a memory buffer, the kaveQBGetIds function fills this buffer with the identifiers of objects from the backup storage. The number of the identifiers in this list is defined by *pCount. The identifiers in the resulting list are sorted by the time of creation. In this way you can receive, for example, a list of identifiers of the first hundred objects placed into the backup storage.It is recommended to follow the procedure below to get all the object identifiers:
kaveQBGetIds function with pqwObjectIds set to NULL.kaveQBGetIds function with pqwObjectIds set to a non-zero pointer to a buffer, and *pCount incremented by some constant value.Syntax
HRESULT kaveQBGetIds (
unsigned long *pCount,
ULONGLONG *pqwObjectIds);
Parameters
The kaveQBGetIds function has the following parameters.
kaveQBGetIds function parameters
Name |
Type |
Description |
|---|---|---|
|
in, out |
A pointer to the number of object identifiers that can be stored in buffer. If If If you are going to retrieve the whole list of the identifiers of all objects in the backup storage, provide for possibility of adding objects from another thread and increase |
|
out |
A pointer to the buffer in memory to store the identifiers of the objects in the backup storage. If you set To get the identifiers of objects in the backup storage, set The buffer must be allocated by the caller before invoking the function. The buffer size in bytes must be greater or equal to If the buffer size is not sufficient to write the requested number of identifiers, the function returns |
Return value
If the kaveQBGetIds function succeeds, its return value is S_OK.
For other return codes, see section "Return codes".
Examples
The example below demonstrates the usage of the kaveQBGetIds function according to the described procedure.
Example: unsigned long Count = 0; kaveQBGetIds(&Count, NULL); // retrieving the number of objects in backup storage Count += 100; // allocating buffer with some excess to handle the case when objects are added from another thread ULONGLONG * pqwObjectIds = new ULONGLONG[Count]; // allocating memory for storing object IDs array kaveQBGetIds(&Count, pqwObjectIds); //building the object IDs list |