Code Comments
Programming Forum and web based access to our favorite programming groups.Is there a way to get a list of options for a control panel applet to be used at the command prompt? For example, desk.cpl has an option to install a screensaver: rundll32 desk.cpl, InstallScreenSaver <ss name> How can I find more options like InstallScreenSaver?
Post Follow-up to this messagecpl files are physically just DLL files which conform to certain
conventions.
Therefore, InstallScreenSaver is just a named entry point in the DLL. It was
not intentionally provided as a means for you to use at a command-line;
rundll32 is just a general tool which allows you to call a specified entry
point in a traditional DLL without having to write a program and compile it.
("Traditional" DLL means non-COM, non-managed code.)
All the various "tips 'n tricks" you can find on the web these days for
using rundll32 have basically been reverse-engineered by people over the
years. There are basically 2 ways to find named entry points yourself:
(1) For system DLLs which implement published Win32 APIs, the Win32 SDK
(part of the Platform SDK that you get with an MSDN subscription or you can
download for free if you're not a subscriber) contains C++ header files and
help files which declare the functions available and explain the parameters.
All together, there are literally over 100,000 such functions but only a
tiny fraction are practical for calling from rundll32.
(2) You can use a tool to extract the entry points "exported" by the DLL.
The old Quick View feature in Windows 9X was able to display DLL exports.
It's not included in any modern version of Windows, but you can buy the
decendent Quick View Plus as a commercial product. (Microsoft had licensed
Quick View from 3rd party.) Alternatively, there is a utility named
dumpbin.exe which comes with Visual C++ that you can run with the /exports
option. Both of these approaches will only show you the function names, but
you may need to find out the parameters in order to make use of them. If
you're not a fairly advanced C++ programmer, you really need a tool like
http://www.heaventools.com/PE_Explo...orts_Viewer.htm to show you the
parameters. Even with this, you're on your own to figure out what the
parameters mean.
"Matt Slavicek" <matts@autechdev.com> wrote in message
news:eM6cYA3jEHA.384@TK2MSFTNGP10.phx.gbl...
> Is there a way to get a list of options for a control panel applet to be
> used at the command prompt? For example, desk.cpl has an option to
> install a screensaver:
>
> rundll32 desk.cpl, InstallScreenSaver <ss name>
>
> How can I find more options like InstallScreenSaver?
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.