Friends who commonly use Windows 9x must be familiar with the two files Rundll32.exe and Rundll.exe. However, since the functions of these two programs were originally limited to use within Microsoft, there must not be many friends who really know how to use them. . Well, if you don't know yet, let me tell you.
First, please do a small experiment (please save the results of the program you are running in advance, otherwise...): Click "Start-Programs-Ms-Dos Mode", enter the Dos window, and then type "rundll32.exeuser. exe,restartwindows", and then press the Enter key. At this time, you will see that the machine has been restarted! How about it? Isn’t it interesting?
Of course, Rundll's function is much more than just restarting your machine. In fact, Rundll, as the name suggests, runs Dll. Its function is to call the Windows dynamic link library through the command line. The difference between Rundll32.exe and Rundll.exe is that the former calls the 32-bit link library, while the latter Applied to 16-bit link libraries, their command format is:
RUNDLL.EXE, <entry point>, <call parameters>
Three points should be noted here: 1. The Dll file name cannot contain spaces. For example, the file is located in the c:/PRogramFiles/ directory. You need to change this path to c:/Progra~1/; 2. The Dll file name and Dll entry There must be no fewer commas between the dots, otherwise the program will error and give no information! 3. This is the most important point: Rundll cannot be used to call Dlls containing return value parameters, such as GetUserName(), GetTextFace(), etc. in Win32API. In Visual Basic, an instruction Shell is provided to execute an external program. The format is:
Shell "command line"
If you can use the Shell command well with Rundll32.exe, your VB program will have effects that are difficult or even impossible to achieve with other methods: Still taking restart as an example, the traditional method requires you to first create a module in the VB project and then write Enter the declaration of WinAPI and finally call it in the program. But now it only takes one sentence:
Shell "rundll32.exeuser.exe,restartwindows" is done! Isn’t it more convenient?
In fact, Rundll32.exe has unique advantages in calling various Windows control panel and system options. Below, I will list the Rundll instructions I collected on the Internet as follows (very useful and can save you a lot of time calling Windows API!!) for everyone to refer to in programming:
Command line: rundll32.exeshell32.dll, Control_RunDLL
Function: Display control panel
Command line: rundll32.exeshell32.dll,Control_RunDLLaccess.cpl,,1
Function: Display the "Control Panel-Accessibility Options-Keyboard" option window
Command line: rundll32.exeshell32.dll,Control_RunDLLaccess.cpl,,2
Function: Display the "Control Panel-Accessibility Options-Sound" option window
Command line: rundll32.exeshell32.dll,Control_RunDLLaccess.cpl,,3
Function: Display the "Control Panel-Accessibility Options-Display" option window
Command line: rundll32.exeshell32.dll,Control_RunDLLaccess.cpl,,4
Function: Display the "Control Panel-Accessibility Options-Mouse" option window
Command line: rundll32.exeshell32.dll,Control_RunDLLaccess.cpl,,5
Function: Display the "Control Panel-Accessibility Options-General" option window
Command line: rundll32.exeshell32.dll,Control_RunDLLsysdm.cpl@1
Function: Run the "Control Panel-Add New Hardware" wizard.
Command line: rundll32.exeshell32.dll,SHHelpShortcuts_RunDLLAddPrinter
Function: Run the "Control Panel-Add New Printer" wizard.
Command line: rundll32.exeshell32.dll,Control_RunDLLappwiz.cpl,,1
Function: Display the "Control Panel-Add/Remove Programs-Install/Uninstall" panel.
Command line: rundll32.exeshell32.dll,Control_RunDLLappwiz.cpl,,2
Function: Display the "Control Panel-Add/Remove Programs-Install Windows" panel.
Command line: rundll32.exeshell32.dll,Control_RunDLLappwiz.cpl,,3
Function: Display the "Control Panel-Add/Remove Programs-Startup Disk" panel.
Command line: rundll32.exesyncui.dll,Briefcase_Create
Function: Create a new "My Briefcase" on the desktop.
Command line: rundll32.exediskcopy.dll, DiskCopyRunDll
Function: Display the copy floppy disk window
Command line: rundll32.exeapwiz.cpl,NewLinkHere%1
Function: Displays the "Create Shortcut" dialog box. The location of the created shortcut is determined by the %1 parameter.
Command line: rundll32.exeshell32.dll,Control_RunDLLtimedate.cpl,,0
Function: Display the "Date and Time" option window.
Command line: rundll32.exeshell32.dll,Control_RunDLLtimedate.cpl,,1
Function: Display the "Time Zone" option window.
Command line: rundll32.exernaui.dll, RnaDial [name of a dial-up connection]
Function: Display the dial-up window of a dial-up connection. If there is a dial-up connection, the current connection status window is displayed.
Command line: rundll32.exernaui.dll,RnaWizard
Function: Display the window of the "New Dial-up Connection" wizard.
Command line: rundll32.exeshell32.dll,Control_RunDLLdesk.cpl,,0
Function: Display the "Display Properties-Background" option window.
Command line: rundll32.exeshell32.dll,Control_RunDLLdesk.cpl,,1
Function: Display the "Display Properties - Screen Saver" option window.
Command line: rundll32.exeshell32.dll,Control_RunDLLdesk.cpl,,2
Function: Display the "Display Properties - Appearance" option window.
Command line: rundll32.exeshell32.dll,Control_RunDLLdesk.cpl,,3
Function: Display the "Display Properties - Properties" option window.
Command line: rundll32.exeshell32.dll,SHHelpShortcuts_RunDLLFontsFolder
Function: Display the Windows "Fonts" folder.
Command line: rundll32.exeshell32.dll,Control_RunDLLmain.cpl@3
Function: Also displays the Windows "Fonts" folder.
Command line: rundll32.exeshell32.dll,SHFormatDrive
Function: Display the format floppy disk dialog box.
Command line: rundll32.exeshell32.dll,Control_RunDLLjoy.cpl,,0
Function: Display the "Control Panel-Game Controller-General" option window.
Command line: rundll32.exeshell32.dll,Control_RunDLLjoy.cpl,,1
Function: Display the "Control Panel-Game Controller-Advanced" option window.
Command line: rundll32.exemshtml.dll, PrintHTML (HTML document)
Function: Print HTML document.
Command line: rundll32.exeshell32.dll, Control_RunDLLmlcfg32.cpl
Function: Display the Microsoft Exchange general options window.
Command line: rundll32.exeshell32.dll,Control_RunDLLmain.cpl@0
Function: Display the "Control Panel-Mouse" option.
Command line: rundll32.exeshell32.dll,Control_RunDLLmain.cpl@1
Function: Display the "Control Panel-Keyboard Properties-Speed" option window.
Command line: rundll32.exeshell32.dll,Control_RunDLLmain.cpl@1,,1
Function: Display the "Control Panel-Keyboard Properties-Language" option window.
Command line: rundll32.exeshell32.dll,Control_RunDLLmain.cpl@2
Function: Display the Windows "Printers" folder.
Command line: rundll32.exeshell32.dll,Control_RunDLLmain.cpl@3
Function: Display the Windows "Fonts" folder.
Command line: rundll32.exeshell32.dll,Control_RunDLLmain.cpl@4
Function: Display the "Control Panel-Input Method Properties-Input Method" option window.
Command line: rundll32.exeshell32.dll, Control_RunDLLmodem.cpl,,add
Function: Run the "Add New Modem" wizard.
Command line: rundll32.exeshell32.dll,Control_RunDLLmmsys.cpl,,0
Function: Display the "Control Panel-Multimedia Properties-Audio" property page.
Command line: rundll32.exeshell32.dll,Control_RunDLLmmsys.cpl,,1
Function: Display the "Control Panel-Multimedia Properties-Video" property page.
Command line: rundll32.exeshell32.dll,Control_RunDLLmmsys.cpl,,2
Function: Display the "Control Panel-Multimedia Properties-MIDI" property page.
Command line: rundll32.exeshell32.dll, Control_RunDLLmmsys.cpl,,3
Function: Display the "Control Panel-Multimedia Properties-CD Music" property page.
Command line: rundll32.exeshell32.dll, Control_RunDLLmmsys.cpl,,4
Function: Display the "Control Panel-Multimedia Properties-Device" property page.
Command line: rundll32.exeshell32.dll,Control_RunDLLmmsys.cpl@1
Function: Display the "Control Panel-Sound" option window.
Command line: rundll32.exeshell32.dll, Control_RunDLLnetcpl.cpl
Function: Display the "Control Panel-Network" option window.
Command line: rundll32.exeshell32.dll,Control_RunDLLodbccp32.cpl
Function: Display the ODBC32 data management options window.
Command line: rundll32.exeshell32.dll,OpenAs_RunDLL{drive:/path/filename}
Function: Display the "Open With" dialog box for the specified file (drive:/path/filename).
Command line: rundll32.exeshell32.dll,Control_RunDLLpassWord.cpl
Function: Display the "Control Panel-Password" option window.
Command line: rundll32.exeshell32.dll, Control_RunDLLpowercfg.cpl
Function: Display the "Control Panel-Power Management Properties" option window.
Command line: rundll32.exeshell32.dll,SHHelpShortcuts_RunDLLPrintersFolder
Function: Display the Windows "Printers" folder. (Same as rundll32.exeshell32.dll,Control_RunDLLmain.cpl@2)
Command line: rundll32.exeshell32.dll,Control_RunDLLintl.cpl,,0
Function: Display the "Control Panel-Regional Settings Properties-Regional Settings" option window.
Command line: rundll32.exeshell32.dll,Control_RunDLLintl.cpl,,1
Function: Display the "Control Panel-Regional Settings Properties-Number" option window.
Command line: rundll32.exeshell32.dll,Control_RunDLLintl.cpl,,2
Function: Display the "Control Panel-Regional Settings Properties-Currency" option window.
Command line: rundll32.exeshell32.dll,Control_RunDLLintl.cpl,,3
Function: Display the "Control Panel-Regional Settings Properties-Time" option window.
Command line: rundll32.exeshell32.dll,Control_RunDLLintl.cpl,,4
Function: Display the "Control Panel-Regional Settings Properties-Date" option window.
Command line: rundll32.exedesk.cpl,InstallScreenSaver[screen saver file name]
Function: Set the specified screen saver file as a Windows screen saver and display the screen saver properties window.
Command line: rundll32.exeshell32.dll,Control_RunDLLsysdm.cpl,,0
Function: Display the "Control Panel-System Properties-General" properties window.
Command line: rundll32.exeshell32.dll,Control_RunDLLsysdm.cpl,,1
Function: Display the "Control Panel-System Properties-Device Manager" properties window.
Command line: rundll32.exeshell32.dll,Control_RunDLLsysdm.cpl,,2
Function: Display the "Control Panel-System Properties-Hardware Configuration File" properties window.
Command line: rundll32.exeshell32.dll, Control_RunDLLsysdm.cpl,,3
Function: Display the "Control Panel-System Properties-Performance" property window.
Command line: rundll32.exeuser.exe,restartwindows
Function: Forcefully close all programs and restart the machine.
Command line: rundll32.exeuser.exe,exitwindows
Function: Forcefully close all programs and shut down the computer.
Command line: rundll32.exeshell32.dll, Control_RunDLLtelephon.cpl
Function: Display the "Dial-up Properties" option window
Command line: rundll32.exeshell32.dll, Control_RunDLLthemes.cpl
Function: Display the "Desktop Theme" options panel
Of course, not only VisualBasic, but also other programming languages such as Delphi.VisualC++ can also use these functions of Rundll by calling external commands. The specific methods will not be described in detail here. Flexible use of Rundll will definitely make your programming easy and achieve twice the result with half the effort! ->