tags:

views:

144

answers:

1

Im writing a C# class library which is going to be used as a proxy between a VB6 application and WCF service.

Some of the WCF service methods use Decimal data types as parameters which Im unable to duplicate directly in the interface I provide to the VB6 application as this is an unsupported type.

How do I implement this in the COM interface and safely convert it to the Decimal type that the WCF interface is expecting?

+4  A: 

Decimal is available in VB6 as a subtype of VARIANT.

  Dim d As Variant

  d = CDec(1)

  MsgBox TypeName(d)

You therefore implement it as a VARIANT with appropriate subtype in the interface.

GSerg