AIDA_dwEvIdGetBlock

The AIDA_dwEvIdGetBlock function returns the first event id of a new block which contains dwSize event ids.

dword AIDA_dwEvIdGetBlock(
  handle hStack,
  dword dwSize
);

Parameters

hStack
Specifies the AIDA stack from which to request the information. This is a handle to an AIDA stack created by one of the AIDA stack manipulation functions.
dwSize
The number of event ids to be allocated.

Return Values

AIDA_dwEvIdGetBlock returns the first id of the allocated id block.

In case of failure the function will return AIDA_nIllegalEventID. The application can retrieve the error code using AIDA_iGetError.

Remarks

To use this function the id manager must have been activated when the stack was created.

The function will only work if the stack is complete.

As marking cyclic events with odd ids is optional this function doesn't distinguish between ids for cyclic and for non-cyclic events.

dwSize is the number of consecutive ids. If an application will only use even or odd ids the effective number of ids usable by the application will be dwSize/2.

In case of success the returned value is always even and is the first id to be used by the application.

Internally to reduce administrational overhead blocks will be allocated with a minimum size.

The current implementation does not support usage counters for event ids but uses a round robin algorithm which assures that normal events just can be created with AIDA_pstCreateEventEx() or a combination of AIDA_pstCreateEvent() and AIDA_boSetEventID(). Cyclic events currently must be managed by the application!

Planned implementation is to support usage counters. Block allocation sets all usage counters of the ids within this block to 1. Binding event ids to events each time (create event, clone event) will increment the usage counter, deleting an event will decrement the usage counter.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Linux: Requires a kernel supporting ELF binaries.
  Header: Declared in bsk_aida.h, also requires portab.h.
  Import Library (Windows): Use BSK_AIDA.lib.

See Also

AIDA Overview, AIDA Functions, AIDA_dwEvIdGetBlockSize, AIDA_boEvIdFreeBlock