Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

running control panel applets with rundll32
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?



Report this thread to moderator Post Follow-up to this message
Old Post
Matt Slavicek
08-31-04 08:56 PM


Re: running control panel applets with rundll32
cpl 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?



Report this thread to moderator Post Follow-up to this message
Old Post
Ronny Ong
08-31-04 08:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

MSDN archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:04 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.