This depends on the SDK, but from your declaration it looks like you're using the C SDK.
You have 2 options (depending on your version of the SDK),
Option 1:
If you are using the nimSessionAddCallback function the parameters are
added to your call interface in the same order that you declared it. E.g
nimSessionAddCallback(nims,"get_info", cbGetInfo, "name,address", 0);
static int cbGetInfo (NIMCB * cb, char *name, char *addr)
{
:
}
Option 2:
Use nimSessionAddCallbackPds function then the argument PDS is the second parameter to your function.
nimSessionAddCallbackPds(nims,"note_detach", cbNoteDetach, "note_id%d,nimid", 0);
static int cbNoteDetach (NIMCB * cb, PDS *pdsArgs)
{
extern int NoteDetach();
int rc=NIME_INVAL;
char **ppNimIds = NULL;
long note_id = 0;
char *nimid = NULL;
if (pdsArgs)
{
pdsGet_LONG(pdsArgs,"note_id",¬e_id);
pdsGet_CPCH(pdsArgs,"nimid",&nimid);
}
:
Note that we added option 2 due to issues we discovered during our 64-bit
ports regarding transferring data (particulary integers) on the stack
So our general rule is, if you have integers in the parameter list for
your callback, then use option 2. I would suggest that you implement
on option 2 regardless, since it makes use of a single callbackfunction
for readability.
Carstein