Crash in Extension Manager callback with VARARG_GET()

I am having issue with my Extension manager callback for Domino 64 bit. In particular, I have registered call back for EM_NSFNOTEUPDATE and in the call back when I am using VARARG_GET() macro, it is crashing.

It looks like that VARARG_PTR which is a part of EMRECORD param in callback function, is invalid. It is also happening with other callback ids as well.

// Registraition is done like that =>

EMRegister(EM_ NSFNOTEUPDATE, EM_REG_BEFORE, BeforeNoteUpdate, wRecursionId, &m_hRegisterIds);

// Call Back function

STATUS PASCAL BeforeNoteUpdate( EMRECORD *pEMRecord)

{

If (pEMRecord->EId == EM_ NSFNOTEUPDATE) {

VARARG_PTR pArgs = pEMRecord->Ap;  // Looks like, it is invalid

NOTEHANDLE hNote = VARARG_GET(pArgs, NOTEHANDLE); // I AM GETTING CRASH ON THIS LINE

// Other stuff……

}

}

Subject: more info

Can you please give us your compile and link lines for your program? I’m wondering if maybe packing/padding might be an issue. Also, are you building with the Intel C/C++ Compiler? Thanks!

Subject: Many thanks for your advice

Hi Ken,Many thanks for pointing out padding issue. I was using VS 2005 and was creating a 64 bit ExtMgr for 64 bit domino. The problem was that in my project solution, ‘Struct Member Alignment’ was set to ‘1 byte’ (/Zp1). As soon as I change it to ‘Default’, it works perfectly.

The ‘command line’ for compiler tab was showing that default means ‘/Zi’.

However the problem is solved but still I will like to know why it was crashing when ‘Struct member Alignment’ was /Zp1 and what is the meaning of /Zi ?