[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [www-vrml] vrml/x3d in frames
Hi Eric,
thanks for the code snippet.
However that code does nothing more than the normal ActiveX control
registration process: it loads the .OCX file as a DLL via LoadLibrary and
calls the DllRegisterServer or DllUnregisterServer exported proc of that
DLL. Then the ActiveX control self-registers itself at the system
if you see:
' Find and store the DLL entry point, i.e. obtain the address of the
' "DllRegisterServer" or "DllUnregisterServer" function (to register
' or deregister the server's components in the registry).
'
If inHandle = "" Then
lpDLLEntryPoint = GetProcAddress(lLib, "DllRegisterServer")
ElseIf inHandle = "U" Or inHandle = "u" Then
lpDLLEntryPoint = GetProcAddress(lLib, "DllUnregisterServer")
Else
you'll notice it loads the .OCX as a DLL library and just calls the
"DllRegisterServer" or "DllUnregisterServer" exported proc from that DLL
the problem is that the code to register the control is inside that proc and
is implemented by each ActiveX control (this is called a self-registering
server), so one has no control on what the ActiveX control registration code
will try to place in the registry (just predict since there are some
standard locations it places its stuff, based on the control's CLASSID
[which I think you can query using typelibrary/typeinfo facilities of COM -
I fear though one has to first register the control, then query it for
typeinfo])
problem is all those write to HKEY_CLASSES_ROOT registry hive which needs
admin priviledges (hope I'm not wrong at that)
what I need is a registry hook (there is such facility in Windows [see free
RegMon tool of SysInternals.com for example]) that would make the control
think it wrote to the registry and then when the app or COM runtime reads
back those values they will come from the fake registry (the hooking
program), not the real registry (where the user may not have enough rights
to install the control's location information)
if you come across any such facility or have more info on that, please
send-in, it's welcome! :o)
> Code snippet ...
> Sorry it's VB, but you'll get the picture...
> Hope your virus scanner doesn't choke ... Well shouldn't
cheers,
George
btw, there might be a CoRegisterServer or CoDLLRegisterServer in the COM
runtime that does the same thing as that VB code (and same as the RegSvr32
or the similar Borland tools), but not sure if such exists
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
George Birbilis <birbilis@kagi.com> [Microsoft MVP J#]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ QuickTime VCL and ActiveX controls (for PowerPoint/VB/Delphi etc.)
+ Plugs VCL and ActiveX controls (InterProcess/Internet communication)
+ TransFormations, VB6 forms to ASP.net WebForms convertion
http://www.kagi.com/birbilis
+ Robotics
http://www.mech.upatras.gr/~robgroup
........................................................................
-------------------------------------------------------------------------
for list subscription/unsubscription,
go to http://www.web3d.org/cgi-bin/public_list_signup/lwgate/listsavail.html