what is the easiest way to allow .net component used by non dot net programs?

J

jg

COM interop by using class template?
Can a vbscript program use it through createobject...etc.

Would the component have to be registered in GAC by admin? or would it be
suffice to register the power user running the vbs with the component.dll
and type lib in the same directory with the vbs files?
 
N

Nicholas Paldino [.NET/C# MVP]

jg,

COM interop is the easiest way.

If you need VB script to access this, then you will need to have the
ClassInterface attribute to the AutoDispatch or AutoDual value from the
ClassInterfaceType enumeration.

The component doesn't HAVE to be registered in the GAC, but it makes it
MUCH easier for COM interop to find it if it is in the GAC.

Hope this helps.
 
J

jg

thank you very much for the quick response.

I am still new and green to dot despite a lot of reading and searching on
MSDN

Can you point me to some example on ClassInterface attribute to the
AutoDispatch or AutoDual value from the
ClassInterfaceType enumeration.

It sound like I need more than just using system.interop.... for my .net
class

Nicholas Paldino said:
jg,

COM interop is the easiest way.

If you need VB script to access this, then you will need to have the
ClassInterface attribute to the AutoDispatch or AutoDual value from the
ClassInterfaceType enumeration.

The component doesn't HAVE to be registered in the GAC, but it makes it
MUCH easier for COM interop to find it if it is in the GAC.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

jg said:
COM interop by using class template?
Can a vbscript program use it through createobject...etc.

Would the component have to be registered in GAC by admin? or would it be
suffice to register the power user running the vbs with the component.dll
and type lib in the same directory with the vbs files?
 
N

Nicholas Paldino [.NET/C# MVP]

jg,

Check out the section of the .NET framework documentation titled
"Exposing .NET Framework Components to COM" for more information and example
on how to expose your components to COM:

http://msdn.microsoft.com/library/d.../cpconexposingnetframeworkcomponentstocom.asp


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

jg said:
thank you very much for the quick response.

I am still new and green to dot despite a lot of reading and searching on
MSDN

Can you point me to some example on ClassInterface attribute to the
AutoDispatch or AutoDual value from the
ClassInterfaceType enumeration.

It sound like I need more than just using system.interop.... for my .net
class

Nicholas Paldino said:
jg,

COM interop is the easiest way.

If you need VB script to access this, then you will need to have the
ClassInterface attribute to the AutoDispatch or AutoDual value from the
ClassInterfaceType enumeration.

The component doesn't HAVE to be registered in the GAC, but it makes
it MUCH easier for COM interop to find it if it is in the GAC.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

jg said:
COM interop by using class template?
Can a vbscript program use it through createobject...etc.

Would the component have to be registered in GAC by admin? or would it
be suffice to register the power user running the vbs with the
component.dll and type lib in the same directory with the vbs files?
 
J

jg

thank you very much
Nicholas Paldino said:
jg,

Check out the section of the .NET framework documentation titled
"Exposing .NET Framework Components to COM" for more information and
example on how to expose your components to COM:

http://msdn.microsoft.com/library/d.../cpconexposingnetframeworkcomponentstocom.asp


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

jg said:
thank you very much for the quick response.

I am still new and green to dot despite a lot of reading and searching on
MSDN

Can you point me to some example on ClassInterface attribute to the
AutoDispatch or AutoDual value from the
ClassInterfaceType enumeration.

It sound like I need more than just using system.interop.... for my .net
class

Nicholas Paldino said:
jg,

COM interop is the easiest way.

If you need VB script to access this, then you will need to have the
ClassInterface attribute to the AutoDispatch or AutoDual value from the
ClassInterfaceType enumeration.

The component doesn't HAVE to be registered in the GAC, but it makes
it MUCH easier for COM interop to find it if it is in the GAC.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

COM interop by using class template?
Can a vbscript program use it through createobject...etc.

Would the component have to be registered in GAC by admin? or would it
be suffice to register the power user running the vbs with the
component.dll and type lib in the same directory with the vbs files?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top