Reputation: 885
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?
Upvotes: 6
Views: 1232
Reputation: 78155
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.
Upvotes: 8