I've re-developed a ActiveX control in C# (basically a drop-in replacement for a age-old VB6 control). Most things work, however, I need to implement property data binding for it.
In VB6, that was an easy thing to do, thanks to the dialog here:
Binding a Control to a Data Source. Simply checking the first 3 options in "Data Binding" would do the trick, and COM-aware applications could bind data to the control.
A similar problem has surfaced already, it seems, with quite a complicated workaround:
You might have to reverse engineer some of the generated code to do this. Offhand, I would create the TLB file, and then use OLEVIEW to view
the IDL.
Then, I would copy and paste the IDL into a new file, and add the
bindable attribute to the idl in the appropriate places. Once that is done,
I would run that IDL file through MIDL, and create a type library. Once you
do that, you should be able to register that type library to create your
CCW's.
It seems there is no facility in .NET to add the [bindable] attribute to a COM class.
Please, any help with this would be greatly appreciated!