HOWTO: Starting a Control Panel Applet in Windows 95 or WinNTLast reviewed: January 9, 1998Article ID: Q135068 |
The information in this article applies to:
SUMMARYIn Windows 95 and Windows NT 4.0, the Control Panel application (Control.exe) is just a stub that calls into the shell to start the Control Panel. To debug a control panel applet, you need to invoke the Control Panel as the calling application. However, Control.exe is just a stub, so the debugger cannot load it. To invoke a control panel applet in Windows 95 or Windows NT 4.0, a program can call into the shell directly.
MORE INFORMATIONThe RunDLL32 utility that shipped with Windows 95 and Windows NT 4.0 allows you to invoke a function exported from a DLL. The Windows 95 and Windows NT 4.0 shells don't call Control.exe when you start the control panel. Instead, the shell invokes a Control_RunDLL function in Shell32.dll. With this information, you can use with the following command line to invoke a control panel applet:
rundll32.exe shell32.dll,Control_RunDLL mycontrol.cplNOTE: The command "Control_RunDLL" is case sensitive and must match the case shown exactly. This starts the first control panel applet in Mycontrol.cpl. If you have multiple control panel applets in Mycontrol.cpl, you need to add to the line as shown here:
rundll32.exe shell32.dll,Control_RunDLL mycontrol.cpl,@1Here @1 specifies the second (zero-based) applet in the .cpl file. If you don't specify this parameter, @0 is used as the default. There is one more parameter you can add. It serves as the command line parameters passed to the control panel applet in the CPL_STARTWPARM notification. For example, a lot of the system's control panel applets take the page number (one based, not zero based) as the command line parameter. For example, if you want to start the Add/Remove Programs applet at the Windows Setup page, so you can instruct the user to add extra system components, you can use this code:
rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,@0,2NOTE: If you put a space after the comma in the commands above, you will get the error:
Error in shell32.dll Missing entry. |
Additional query words: Windows 95 debug CPL
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |