Board index » Visual Studio » how to use an activeX DLL?

how to use an activeX DLL?

Visual Studio37
Hi,



Sometimes the most fundamental things can be a real PITA to locate. I

have an activeX DLL that I created in VB6 to help me with some things

that VBScript wasn't capable of, and now I'm struggling to fiigure out

what I need to do to be able to use it.



I wonder if someone could point me in the right direction?



Thanks

Eric


-
 

Re:how to use an activeX DLL?

Just register it and create the object. By default,

the object will be filename.classname. In other

words, if you made Test1.dll with a public (type 5)

class named TestClass then your object is

Test1.TestClass.



If you need to register it by hand you can use

Start ->run ->RegSvr32 [path of DLL]



In script you can use the WScript.Shell Run method:



sh.Run(sys & "\regsvr32.exe " & arg) '--where arg is DLL path.



silent reg.:



sh.Run(sys & "\regsvr32.exe /S " & arg)



unregister:



sh.Run(sys & "\regsvr32.exe /U " & arg)



Note that people seem to be having trouble with COM

in Vista. I'm still not clear about exactly what they problem

is, but it seems that registering COM servers doesn't

work with UAC enabled.



Quote


Sometimes the most fundamental things can be a real PITA to locate. I

have an activeX DLL that I created in VB6 to help me with some things

that VBScript wasn't capable of, and now I'm struggling to fiigure out

what I need to do to be able to use it.



I wonder if someone could point me in the right direction?



Thanks

Eric





-

Re:how to use an activeX DLL?

Thanks very much, that worked

-