Solidoworks throws exception when calling AddComponents3(...)

I am having trouble with Solidworks 2011 SP5.0 using the API function AddComponents3(…).  The following info is in the log file:

[EVT_SWITCH_TO_ASSEMBLY]

"5b996672-a47a-4f4b-b552-29fea2417959"

auComponent_c::XDispatch2::Select;auAssemblyDoc_c::ClearSelectionsNotify;auAssemblyDoc_c::NewSelectionNotify;auAssemblyDoc_c::XDispatch::FixComponent;auAssemblyDoc_c::NewSelectionNotify;auAssemblyDoc_c::ClearSelectionsNotify;auAssemblyDoc_c::FeatureManagerTreeRebuildNotify;auModelView_c::RepaintNotify;auModelView_c::RenderLayer0Notify;

"Access Violation at 5ed4bb32 (virtual address 1babfffe), attempt to write to memory";

OPENGL32:5ED4BB32:0004BB32,OPENGL32:5ED4D273:0004D273,OPENGL32:5ED99E0E:00099E0E,OPENGL32:5ED7BF22:0007BF22,OPENGL32:5ED7C120:0007C120,OPENGL32:5ED7DB37:0007DB37,OPENGL32:5ED7E640:0007E640,OPENGL32:5ED9D115:0009D115,OPENGL32:5ED1C5C0:0001C5C0,sldrglu:419172E7:000672E7,sldrglu:419189BA:000689BA,sldgfxu:4204B7AF:0006B7AF,sldgfxu:42038B6B:00058B6B,sldgfxu:4203E4CC:0005E4CC,sldgfxu:4203FDAC:0005FDAC,sldgfxu:4208B766:000AB766,sldgfxu:420935C9:000B35C9,sldgfxu:4208B6DF:000AB6DF,sldgfxu:4205D622:0007D622,sldgfxu:420935C9:000B35C9,sldgfxu:42062FC0:00082FC0,sldgfxu:42062DE5:00082DE5,sldgfxu:42064588:00084588,sldgfxu:42064902:00084902,sldgfxu:4204CECB:0006CECB,sldgraphicsuiu:419B00D7:000200D7,sldgraphicsuiu:419B2FF7:00022FF7,sldgraphicsuiu:419B44DA:000244DA,sldgraphicsuiu:419B8486:00028486,sldasmu:4538C23E:0007C23E,slduiu:4B041837:00521837,mfc90u:78A71448:00091448;

"d8e16233-e3f1-4821-8371-874007f70201"

"Invalid Deactivation";

ntdll:7C94487F:0004487F,USER32:7E41885A:0000885A,USER32:7E428EA0:00018EA0,USER32:7E428EEC:00018EEC,ntdll:7C90E473:0000E473,USER32:7E418A10:00008A10,mfc90u:78A7E30E:0009E30E,sldappu:4908AC97:0005AC97,sldappu:4908B601:0005B601,mfc90u:78A4AE6B:0006AE6B,sldworks:0040D7E3:0000D7E3,kernel32:7C817077:00017077;

CMD:AppFinish ATTR:PageFileBytes=387493888 ATTR:PageFileBytesPeak=388022272 ATTR:PoolNonpagedBytes=46460 ATTR:PoolPagedBytes=1061636 ATTR:PrivateBytes=387493888 ATTR:VirtualBytes=1006403584 ATTR:VirtualBytesPeak=1035628544 ATTR:WorkingSet=395112448 ATTR:WorkingSetPeak=396013568 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=20000 ATTR:GDIHandlesUsed=973

220066, 396013568, 395128832, 1120684, 1061276, 46996, 46380, 387497984, 388022272, 387497984

1327517263

0

This works fine on a Win7 64bit machine but fails on a XP 32bit machine.  Same code has been working for a while using Solidworks 2010.  Previously we were using the function AddComponents() without issue.

Any idea what is going on?

SolidworksApi macros