

#include <nitro/wbt.h>BOOL WBT_RegisterBlock(WBTBlockInfoList *block_info_list, u32 block_id, const void *user_id, const void *data_ptr, int data_size, u16 permission_bmp);
block_info_list |
Pointer to the WBTBlockInfoList structure used for registration. This structure is used by the WBT library until it is deallocated by the WBT_UnregisterBlock function. |
block_id |
Unique user-defined value allocated to the block to be registered. The value must be greater than WBT_BLOCK_ID_MIN. |
user_id |
User-defined data given to a block. The size is WBT_USER_ID_LEN bytes. |
data_ptr |
Buffer that holds block data. If this value is not NULL, the buffer is referenced by the WBT library until the buffer is deallocated with the WBT_UnregisterBlock function. Therefore, until then, the buffer must not be changed or destroyed.If this value is NULL, the WBT_CMD_SYSTEM_CALLBACK callback will be notified as necessary about the partial buffer preparation request by means of a WBT_CMD_PREPARE_SEND_DATA event.
|
data_size |
Block data size. |
permission_bmp |
Reserved for a future extension. Always specify 0. |
Registers the block and returns TRUE if the specified block ID is not currently registered and the total number of registered blocks is less than WBT_NUM_MAX_BLOCK_INFO_ID.
Otherwise, it does nothing and returns FALSE.
Registers a data block in the WBT internal block list, based on the information specified. You can receive registered blocks from other communication parties with the WBT_GetBlock function.
WBT_UnregisterBlock
WBT_GetBlockInfo
WBT_GetBlock
WBTBlockInfoList
2004/09/21 Initial version.
CONFIDENTIAL