473,386 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Class Library for use in VBScript

Hi all,

How do I go about making a C# .NET class library available for use in a
VBScript file using something like?

Set mylib = CreateObject("MyLibrary.Utils")

Surely it must be able to be done without too much fuss.

Jesse
Nov 22 '05 #1
2 3014
Jessard wrote:
How do I go about making a C# .NET class library available for use in
a VBScript file using something like?
Set mylib = CreateObject("MyLibrary.Utils")


Firstly, you need to make sure the class library is registered for com
interop. You can do this manually, but it's easier to create a new COM class
(project / add component / COM class) and move all your existing stuff into
there. You need to check things in the assemblyinfo file such as versioning,
and turn off automatic versioning to make things easier later, and you have
to create a strong name for the project (see the link below). You then
compile the dll and use it how you like. It's best to install it in the
global assembly cache so you can just use VBScript's CreateObject function.

More info about all the above steps here:
http://www.15seconds.com/issue/040723.htm
Nov 22 '05 #2
Jessard wrote:
How do I go about making a C# .NET class library available for use in
a VBScript file using something like?
Set mylib = CreateObject("MyLibrary.Utils")


Firstly, you need to make sure the class library is registered for com
interop. You can do this manually, but it's easier to create a new COM class
(project / add component / COM class) and move all your existing stuff into
there. You need to check things in the assemblyinfo file such as versioning,
and turn off automatic versioning to make things easier later, and you have
to create a strong name for the project (see the link below). You then
compile the dll and use it how you like. It's best to install it in the
global assembly cache so you can just use VBScript's CreateObject function.

More info about all the above steps here:
http://www.15seconds.com/issue/040723.htm
Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jessard | last post by:
Hi all, How do I go about making a C# .NET class library available for use in a VBScript file using something like? Set mylib = CreateObject("MyLibrary.Utils") Surely it must be able to be...
2
by: Jessard | last post by:
Help! Hi, I'm having a bit (well a lot - it's getting annoying) of trouble using a C# class library within a VBScript on a computer other than the development machine. All the class is needed...
3
by: | last post by:
This is a semi-advanced question about ASP VBScript 5.0 classes. If you're knowledegable, please lend a hand! VBScript class instances can have properties that have objects assigned to them....
2
by: Jessard | last post by:
Help! Hi, I'm having a bit (well a lot - it's getting annoying) of trouble using a C# class library within a VBScript on a computer other than the development machine. All the class is needed...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.