how to get OCB

Hi.

I am writing a resource manager, i have registered my message handler via message_attach function. In the handler function i need to use my extended OCB structure. I have found that _resmgr_ocb() function is used to get an OCB. My problem is that definition of this function uses resmgr_context_t * ctp parameter but in the definition of the message handler function is used message_context_t *ctp. Are these structures more or less the same and can I use message_context_t *ctp to get OCB via _resmgr_ocb()? Is there any other way to get OCB?

Thanks.

Michal

I have done some experiments and it looks that it is working :slight_smile:

Michal

While they aren’t “the same” they are unioned overlays so that you can use on in place for the other. My question is, if you are already in the
handler function, why don’t you just use the ocb passed in to you? This ocb should be your extended ocb, unless you are trying to get access
to another connections handle.