An input of Decimal in a .Net Written COM exposed as wchar_t

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all, I have a COM that has a single function:

public Test(Decimal input)
{
return input;
}

From MSDN, it said that Decimal, be default, will be marshalled as COM's
Decimal
But I found that it become wchar_t

the MarshalAs Attribute only has Currency for decimal (but no "Decimal")

any idead what is happening?!

Thanks
 
From MSDN, it said that Decimal, be default, will be marshalled as COM's
Decimal
But I found that it become wchar_t

I assume you're using OleView to view the typelib. It has a bug in
that it incorrectly decompiles DECIMAL to wchar_t. So your interface
is probably correct after all.


Mattias
 
Back
Top