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

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
 
M

Mattias Sjögren

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top