var shellObj = new ActiveXObject("WScript.Shell");
var clsid = "F5078F32-C551-11D3-89B9-0000F81FE221";
var progid =
shellObj.RegRead("HKEY_CLASSES_ROOT\\CLSID\\{"+clsid+"}\\ProgID\\");
var xmlDoc = new ActiveXObject(progid);
Michael
So far I've used 'find' in regedit to locate the ActiveX control and the
string needed to generate it using 'new ActiveXObject()', but would be
nice if I could do the reverse lookup automatically and ditch CLSIDs
altogether.
Thank you.
Matt
> -----Original Message-----
> From: softimag...@listproc.autodesk.com
> [mailto:softimag...@listproc.autodesk.com] On Behalf Of
> Michael Buss
> Sent: Wednesday, September 16, 2009 9:20 PM
> To: soft...@listproc.autodesk.com
> Subject: Re: Create ActiveX object from CLSID
>
"<object {clsid:xxxx-xxxx-xxx-xxx-xxx}, attributeName="", ....>
I need to convert the CLSID into the ActiveX object. I have tried:
var oControl = XSIFactory.CreateActiveXObject(
"clsid:xxxx-xxxx-xxxx" );
- and -
var oControl = XSIFactory.CreateActiveXObject( "xxxx-xxxx-xxxx"
);
LogMessage( "Class: " + Application.ClassName( oControl ) );
but the returned control doesn't play nice with Application.ClassName().
No exceptions thrown, but nothing is returned either. So I have no idea
what was returned.
Matt
Luc-Eric Rousseau
Team Leader, Softimage
It works when you remove the "clsid:"-part from the string, but leave
the brackets:
var oControl = XSIFactory.CreateActiveXObject("{xxxx-xxxx-xxxx}");
The documentation can be found here:
http://msdn.microsoft.com/en-us/library/aew9yb99(VS.85).aspx