Author: janderwald
Date: Thu Feb 7 14:21:10 2008
New Revision: 32183
URL:
http://svn.reactos.org/svn/reactos?rev=32183&view=rev
Log:
- improve control a bit so it that can execute cpl specified on the command line
- ignore the function index, page index for now
Modified:
trunk/reactos/base/applications/control/control.c
Modified: trunk/reactos/base/applications/control/control.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
==============================================================================
--- trunk/reactos/base/applications/control/control.c (original)
+++ trunk/reactos/base/applications/control/control.c Thu Feb 7 14:21:10 2008
@@ -404,6 +404,7 @@
_tmain(int argc, const TCHAR *argv[])
{
STARTUPINFO si;
+ TCHAR * szExt;
si.cb = sizeof(si);
GetStartupInfo(&si);
@@ -436,6 +437,22 @@
{
return RunControlPanel(_T("main.cpl"), 1);
}
+ else if ((szExt = _tcsstr(argv[1], _T(".cpl"))))
+ {
+ TCHAR * szSep;
+ TCHAR szCPL[MAX_PATH];
+ UINT selPage = 0;
+
+ _tcscpy(szCPL, argv[1]);
+ szSep = _tcsstr(szCPL, _T(".cpl,"));
+
+ if (szSep)
+ {
+ /* FIXME for now ignore page index */
+ szSep[4] = _T('\0');
+ }
+ return RunControlPanel(szCPL, selPage);
+ }
return 0;
}