kunal
kunal

Reputation: 966

UInt32x32To64 identifier not found

I am coding in C++ and i am importing a C# class library using

#import "C:\abc\abc.tlb" 
using namespace XYZ;

When i do this i get an error in the file comutil.h the error is UInt32x32To64 identifier not found.I don't know i get this when i try to import a tlb file. Can anyone help me in this matter? This is where the portion of comutil.h

static HRESULT UIntMult(UINT uMultiplicand, UINT uMultiplier, UINT *puResult)
{
    ULONGLONG ull64Result = UInt32x32To64(uMultiplicand, uMultiplier);
    if(ull64Result <= INTSAFE_UINT_MAX)
    {
        *puResult = (UINT)ull64Result;
        return S_OK;
    }
    return INTSAFE_E_ARITHMETIC_OVERFLOW;
}

Thanks

Upvotes: 1

Views: 302

Answers (1)

David Heffernan
David Heffernan

Reputation: 612794

UInt32x32To64() is a macro defined in the Windows header files. You need to #include <Windows.h> to gain access to it.


Hans's comment is spot on. If you have HRESULT and UINT then presumably you have Windows.h. In which case the lack of the macro is presumably because the architecture conditional has not been defined.

Upvotes: 1

Related Questions