Miguel,
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.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
(E-Mail Removed)
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I like to create an assembly with a property exposed in COM as
> bindable. I have tried to use [Bindable(true)] attribute but when I
> check the typelib produced by regasm for my assembly the property does
> not have bindable on it.
>
> Here is some code of what I mean:
>
> [Bindable(true)]
> public bool ActiveXDone
> {
> get
> {
> return _activeXDone;
> }
> set
> {
> _activeXDone = value;
> }
> }
>
> when I use regasm to generate a typelib for my assembly I like to get
> the following (note the bindable attribute):
>
> [id(0x60020000), propget, bindable]
> HRESULT ActiveXDone([out, retval] VARIANT_BOOL* pRetVal);
> [id(0x60020000), propput, bindable]
> HRESULT ActiveXDone([in] VARIANT_BOOL pRetVal);
>
> but instead I get the following :
>
> [id(0x60020000), propget]
> HRESULT ActiveXDone([out, retval] VARIANT_BOOL* pRetVal);
> [id(0x60020000), propput]
> HRESULT ActiveXDone([in] VARIANT_BOOL pRetVal);
>
>
> What am I doing wrong ?
>