okay, we are now out of the water.. function takes inputs exactly as passed from Excel to a function with LPXLOPERs as each parameter.
64-bit worked with Excel (64bit) on my laptop.  Now I have to test this on a machine with 32-bit Excel.  May have to tinker with some of the parameter, but it should be easy because most 32-bit types are 4 byte anyway.