Undocumented function syssetup.dll.SetupQueryRegisteredOsComponent

Rolf Kalbermatter r.kalbermatter at hccnet.nl
Sat Mar 24 07:29:36 CDT 2007


Dan Kegel [mailto:dank at kegel.com] wrote:

>Any suggestions as to how to discover the prototype of the apparently
>undocumented function syssetup.dll.SetupQueryRegisteredOsComponent ?
>It seems to be needed to install mdac-2.8.
>( http://bugs.winehq.org/show_bug.cgi?id=5824 )

Well, on the web it does not seem to say anything about that function. So
that leaves only reverse engineering. Which means someone would have to dig
into it and try to come up with a prototype and possibly some explanation
about the parameters and someone else would have to find what can be done.

>From a quick check it seems to take three parameters, with the first being
a CLSID or other GUID and the other two being DWORDs. The second parameter
is checked to be higher than 0 and smaller or equal to 0xDC and the third
parameter is checked to be higher than 0 and smaller or equal to 0x454.
(This is XP SP2 fully patched).
When any of the three parameters are 0, the function sets last error to 0x57
and returns with 0. When the second and third parameter is above the limits
the function sets last error to 0x0D and returns with 0. When everything was
successful the function returns with 1.

And the function starts with opening for read access
HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\ExceptionComponents
then opens the subkey inside that key from the stringified CLSID. For any
registry error the last error is set to the registry function return value
and the function itself returns 0. After that things get hairy and seem to
be related to functions like SetupEnumerateRegisterdOsComponents() and
SetupQueryRegisteredOsComponentsOrder() too. 

As it seems this is a function that requires magic numbers as parameters
and for that reason I'm quite sure that a real implementation is basically
impossible without disassembling most of syssetup. Maybe that a stub
implementation is enough to get MDAC setup to work.

Rolf Kalbermatter





More information about the wine-devel mailing list