Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to: Use a COM API object in VBScript

Status
Not open for further replies.

plarocque

MIS
Jul 2, 2003
26
CA
Hi,

I try to script a code to install a quota on my user directory. Northern (product I use) provide me with a SDK and a recipe on how to use their COM API within VB. I have already register their DLL within my registry. The problem I have is to use it within my vbscript program. The way to use it in VB is as follow:

Dim QSS as new qsComApiLib.qsComApiSession
QSS.server = "my server name"

Dim tmpquota as QSComApiLib.QSComAPiQuotaItem

and then I sould have access to all the methods attached to the object.

In Vbscript I tried:

Set TmpQuota = CreateObject("qsComApiLib.qsComApiSession")
Of course it doesn't work, would be to easy. It give me an error about my ActiveX component that can't create the object.

Anybody worked with something like that before?

Thanks in advance.

Pierre.
 
that error can mean that the object is not registerd or does not exisit. Make sure it is registed and two make sure you are spelling it correctly.
 
That error message can also occur if the COM server does not expose an Automation interface, which is used for late binding.

(Scripted languages use late binding. VB can use either early binding, as in the example you were given, or late binding.)

Ask the support people for Northern if their DLL supports late binding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top