COM Interop problem 
Author Message
 COM Interop problem

Hi all,
I'm implementing a COM interface through Interop Services and VB is getting
the signature of a procedure wrong or something.
The IDL for the IPlugin Interface looking like this:

[propputref, helpstring("property ParcelSelectionMgr")] HRESULT
ParcelSelectionMgr([in] IDispatch** newVal);

The prototype is:
STDMETHOD(putref_ParcelSelectionMgr)(/*[in]*/ IDispatch** newVal);

And, in a class module I create an interface that inherits from the IPlugin
Interface. It looks like this:

Public Interface _CIPlugWeed
    Inherits PLUGININTERFACESLib.IPlugIn
End Interface

The underscore in this Interface is only so that VB 6 clients can read this
thing. Then, I create a CIPlugWeed class that Implements the _CIPlugWeed
Interface.

VB  puts the signature for the ParcelSelectionMgr from the IDL in the module
like this:

Public WriteOnly Property ParcelSelectionMgr() As IntPtr Implements
VB_TestPlugin._CIPlugWeed.ParcelSelectionMgr
    Set(ByVal Value As IntPtr)
    End Set
End Property

But it can't deal with it cause there's a squiggly line under the
VB_TestPlugin._CIPlugWeed.ParcelSelectionMgr
after the Implements keyword and the message is:
"ParcelSelectionMgr cannot implement ParcelSelectionMgr because there is no
matching property on interface _CIPlugWeed"

If I try and trick the IDE by putting a Sub in there to implement the putref
like this:
Public Sub set_ParcelSelectionMgr(ByRef obj As IntPtr)
     m_objParcelMgr = obj
End Sub

VB tells me that the WriteOnly property implicitly implements
set_ParcelSelectionMgr, but commenting it out doesn't tell vb that the
WriteOnly property has been implemented.

I know this is a lot. I'm sorry but I didn't know how else to write all this
out. I hope I've been clear.
I really need some help in how to implement this ParcelSelectionMgr,
otherwise I can't compile. I appreciate you masters out there helping me
out.

Steve



Sun, 14 Aug 2005 04:49:16 GMT  
 COM Interop problem
Okay, so the reason the message that shows up when the mouse point is placed
over the squiggly lines is because ParcelSelectionMgr doesn't show up in
intellisense. But it does show up in the object browser. Anybody know why
that could be?


Quote:
> Hi all,
> I'm implementing a COM interface through Interop Services and VB is
getting
> the signature of a procedure wrong or something.
> The IDL for the IPlugin Interface looking like this:

> [propputref, helpstring("property ParcelSelectionMgr")] HRESULT
> ParcelSelectionMgr([in] IDispatch** newVal);

> The prototype is:
> STDMETHOD(putref_ParcelSelectionMgr)(/*[in]*/ IDispatch** newVal);

> And, in a class module I create an interface that inherits from the
IPlugin
> Interface. It looks like this:

> Public Interface _CIPlugWeed
>     Inherits PLUGININTERFACESLib.IPlugIn
> End Interface

> The underscore in this Interface is only so that VB 6 clients can read
this
> thing. Then, I create a CIPlugWeed class that Implements the _CIPlugWeed
> Interface.

> VB  puts the signature for the ParcelSelectionMgr from the IDL in the
module
> like this:

> Public WriteOnly Property ParcelSelectionMgr() As IntPtr Implements
> VB_TestPlugin._CIPlugWeed.ParcelSelectionMgr
>     Set(ByVal Value As IntPtr)
>     End Set
> End Property

> But it can't deal with it cause there's a squiggly line under the
> VB_TestPlugin._CIPlugWeed.ParcelSelectionMgr
> after the Implements keyword and the message is:
> "ParcelSelectionMgr cannot implement ParcelSelectionMgr because there is
no
> matching property on interface _CIPlugWeed"

> If I try and trick the IDE by putting a Sub in there to implement the
putref
> like this:
> Public Sub set_ParcelSelectionMgr(ByRef obj As IntPtr)
>      m_objParcelMgr = obj
> End Sub

> VB tells me that the WriteOnly property implicitly implements
> set_ParcelSelectionMgr, but commenting it out doesn't tell vb that the
> WriteOnly property has been implemented.

> I know this is a lot. I'm sorry but I didn't know how else to write all
this
> out. I hope I've been clear.
> I really need some help in how to implement this ParcelSelectionMgr,
> otherwise I can't compile. I appreciate you masters out there helping me
> out.

> Steve



Sun, 14 Aug 2005 06:49:27 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Com interop problem with Framework 1.1

2. Com/Interop problem

3. COM Interop problem

4. COM interop problems

5. COM Interop problem

6. Problem passing VB COM+ ASP Request object to .NET component System.Web.HTTPRequest through COM interop

7. COM interop or vbscript problem

8. COM interop or VBScript problem

9. Automation error referencing .net dll from com (com interop)

10. COM Interop question

11. Strong named COM Interop

12. ParamArray and COM Interop

 

 
Powered by phpBB® Forum Software