xltypeInt issue

Oct 3, 2016 at 11:33 AM
Hi Keith,
I'm trying to use xll8 instead previous version.
I've just found this issue.

OPERX is seems is not using right XOPER(double) for this case, I don't know, I am still beginner.
This is the result.
Cell(0,0) = 57920 // IS WRONG ??? = 123456 - (ShortIntMax 65.535 + 1)
Cell(0,1) = 123456


Here is code:
#define EXCEL12
#include "../xll/xll.h"

using namespace xll;

static AddInX xai_macro(
    // C function name, Excel macro name
    _T("?xll_macro_t"), _T("XLL.MACRO.T")
);
int WINAPI
xll_macro_t(void)
{
#pragma XLLEXPORT

        OPERX oCell;

        oCell.xltype = xltypeSRef;
        oCell.val.sref.count = 0;
        oCell.val.sref.ref.rwFirst = 0;
        oCell.val.sref.ref.rwLast = 0;
        oCell.val.sref.ref.colFirst = 0;
        oCell.val.sref.ref.colLast = 0;

        OPERX o;
        o = 123456;

        Excel<XLOPERX>(xlSet, oCell, o);


        oCell.val.sref.ref.colFirst = 1;
        oCell.val.sref.ref.colLast = 1;

        double d = 123456;
        o = d;

        Excel<XLOPERX>(xlSet, oCell, o);

    return 1; // success
}
Many thanks for great library.
Lukas