RawExtrasSubscriberInitSignature

Type Alias RawExtrasSubscriberInitSignature 

Source
pub type RawExtrasSubscriberInitSignature = unsafe extern "C" fn(&RawExtrasAddonInfo, &mut RawExtrasSubscriberInfoHeader);
Expand description

This function must be exported by subscriber addons as ‘arcdps_unofficial_extras_subscriber_init’. It’s called once at startup. Can be called before or after arcdps calls mod_init.

The callee MUST verify that RawExtrasAddonInfo::api_version is the version it expects (which is the current api_version when the callee was written). The callee MUST verify that RawExtrasAddonInfo::max_info_version is equal to or higher than the ExtrasSubscriberInfo struct version it intends to use (to ensure that the buffer has enough room for the info struct). The callee MAY use the RawExtrasAddonInfo::max_info_version field to dynamically determine which info version to use, in order to gain backwards compatibility. If any of these verifications fail, the callee MUST return without modifying the buffer pointed to by pSubscriberInfo.

The callee SHOULD populate the buffer pointed to by pSubscriberInfo with one of the ExtrasSubscriberInfo structs above. If initialization fails, the callee SHOULD leave the buffer untouched to indicate initialization failure