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

  • Thread starter Thread starter jg
  • Start date Start date
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?
 
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.
 
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?
 
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?
 
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?
 
Back
Top