Board index » cppbuilder » Return Variant from ActiveX Control Method

Return Variant from ActiveX Control Method

I 'm trying to use ActiveForm control. Using typelibrary editor, I made a
member method 'Method1'  of ActiveForm dispatch interface. This method returns
Variant value. When I tried to make this control, I got a error message that
'virtual function Method1 conflict with .....'. I haven't added any code to
this program. ActiveX Wizard made all of methods.  I succeeded in making
ActiveForm control that contain methods that return HRESULT value.

Please Help!!

Hirofumi Kawakubo
        Yonago National College of Technology
        e-mail:da...@sanmedia.or.jp

 

Re:Return Variant from ActiveX Control Method


Any method of an OLE interface must return a HRESULT.
The Wizard should not let you input anything else (the MSDev Wizard does not let
you input another type ... but others kind of conflicts arise)
You can however implement a PropertyPut or PropertyGet method that allows a
VisualBasic caller to call this method as a function.

Quote
Hirofumi Kawakubo wrote:
> I 'm trying to use ActiveForm control. Using typelibrary editor, I made a
> member method 'Method1'  of ActiveForm dispatch interface. This method returns
> Variant value. When I tried to make this control, I got a error message that
> 'virtual function Method1 conflict with .....'. I haven't added any code to
> this program. ActiveX Wizard made all of methods.  I succeeded in making
> ActiveForm control that contain methods that return HRESULT value.

> Please Help!!

> Hirofumi Kawakubo
>         Yonago National College of Technology
>         e-mail:da...@sanmedia.or.jp

Other Threads