
Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
I think you are right but I don't have a separate tlb file for any other
components. I searched the registry and removed all references to my COM
Object, ran the object from its exe and that set up the registy entries on
its own. That then allowed me to add the reference.
What I did find was an entry in the registry for an item that wasn't
showing up anywhere else in the interop dll.
I was then able to invoke as follows:
Type m_nest = Type.GetTypeFromProgID ("NestOle.Document");
object ibaseObject = Activator.CreateInstance(m_nest);
object[] arguments = new object [] {"c:\\nestmgr\\batch\\13.bat"};
m_nest.InvokeMember ("goNest",BindingFlags.Default |
BindingFlags.InvokeMethod,null,ibaseObject,arguments);
This works, but is not quite as tidy as other COM componenets that just
needed adding as a reference, instantiating with "new" and calling their
methods. I can obviously now write my own wrapper class based on this to
simplify the method calls.
Does this mean the COM/tlb are not written "correctly" and so VS is missing
this component when creating the interop dll or have I missed something.
Thankyou for your help Peter
> Hi
>
[quoted text clipped - 14 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" [MSFT] - 10 Dec 2004 03:35 GMT
Hi
Do you mean the late-binding via the InvokeMember will work, but if you use
the early-binding then the com server will not work?
If so, I think you are right, it seems that the Interop Assembly generated
by IDE may not be correct.
So far, I think you workaround is correct, that is to write the Wrap
yourself.
Hope his helps.
Best regards,
Perter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
DGreen13 - 10 Dec 2004 08:39 GMT
Yes the late binding works, but the early binding doesn't.
I'm happy with my workaround and I've learnt a lot about interop in the mean
time.
Thank you very much for your help, I can now get on with the rest of my
project
Dave
> Hi
>
[quoted text clipped - 15 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" [MSFT] - 13 Dec 2004 05:28 GMT
Hi
Thanks for your quickly reply!
I am glad my suggestion helped you.
Best regards,
Perter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.