When you move between SDKs are you also replacing PIMain.c in your code to match each SDK?
Hmm. It's hard to believe, but Adobe seem to have messed this up.
In the Acrobat 9 SDK we find in PDProcs.h a selection of routine definitions
NPROC(void, PDFileAttachmentSetFieldText, (PDFileAttachment attachment, ASAtom fieldID, ASText text))
NPROC(ASBool, PDFileAttachmentGetFieldText, (PDFileAttachment attachment, ASAtom fieldID, ASText text))
NPROC(void, PDFileAttachmentSetFieldNumber, (PDFileAttachment attachment, ASAtom fieldID, float number))
NPROC(ASBool, PDFileAttachmentGetFieldNumber, (PDFileAttachment attachment, ASAtom fieldID, float *number))
In a later SDK we find
NPROC(void, PDFileAttachmentSetFieldText, (PDFileAttachment attachment, ASAtom fieldID, ASText text))
NPROC(void, PDFileAttachmentSetFieldStyledText, (PDFileAttachment attachment, ASAtom fieldID, ASConstText text))
NPROC(ASBool, PDFileAttachmentGetFieldText, (PDFileAttachment attachment, ASAtom fieldID, ASText text))
NPROC(ASBool, PDFileAttachmentGetFieldStyledText, (PDFileAttachment attachment, ASAtom fieldID, ASText text))
NPROC(void, PDFileAttachmentSetFieldStyle, (PDFileAttachment attachment, ASAtom fieldID, ASConstCab styles))
NPROC(ASBool, PDFileAttachmentGetFieldStyle, (PDFileAttachment attachment, ASAtom fieldID, ASCab styles))
NPROC(void, PDFileAttachmentSetFieldNumber, (PDFileAttachment attachment, ASAtom fieldID, float number))
NPROC(ASBool, PDFileAttachmentGetFieldNumber, (PDFileAttachment attachment, ASAtom fieldID, float *number))
This is absolutely against how the header files must be maintained. Because later in the same header file we find the definition of PDDocCreatePDCollection. Why does it matter? Because each NPROC adds 1 to the current HFT entry. This means that if we use any routine after this point in PDProcs we will be calling the wrong code, with all sorts of bad consequences.
The easy way to resolve this is to build two plug-ins. Building one plug-in is not actually impossible, but is going to need very low level and detailed understanding of how HFTs work. I wouldn't like to do it (though I would if I had to).