Pietro M
Pietro M

Reputation: 1939

Excel plug-in error moving from WindowsXP 32 bit to Windows7 64 bit

I am debugging an Excel 2010 plug-in, done by someone else, moving from WindowsXP 32 bits to Windows 7 64 bits.

I get a compile time error in the XLCALL.CPP file, part of "Microsoft Excel Developer's Toolkit - Version 14.0".

This is the code with the error:

...
typedef int (PASCAL *EXCEL12PROC) (int xlfn, int coper, LPXLOPER12 *rgpxloper12, LPXLOPER12 xloper12Res);

HMODULE hmodule;
EXCEL12PROC pexcel12;

__forceinline void FetchExcel12EntryPt(void)       // <<< error, line 36
    {
        if (pexcel12 == NULL)
        {
            hmodule = GetModuleHandle(NULL);
            if (hmodule != NULL)
            {
                pexcel12 = (EXCEL12PROC) GetProcAddress(hmodule, EXCEL12ENTRYPT);
            }
        }
    }

This is the error message:

S:\3rdparty\2010 Office System Developer Resources\Excel2010XLLSDK\SRC\XLCALL.CPP|36|error: expected constructor, destructor, or type conversion before 'void'

I have no clue about the possible reason of this error. In the XLCALL.H include file there are no class definitions, just POD structures, so it should not look for constructors/destructors. The function the error refers to is local to that file (i.e. not declared in the include file). No other files are included.

Thank you for any help!

Platform:
Windows 7 64 bits
Excel 2010
MinGW32
CodeBlocks 10.05

Upvotes: 0

Views: 229

Answers (1)

Pietro M
Pietro M

Reputation: 1939

Ok, it seems that to develop C++ tools which have to work with Microsoft products, the best thing to do is to use Microsoft Visual C++.

Doing that, all these issues just disappeared.

Upvotes: 1

Related Questions