// - Call the code of the shell interface (system run window)
#include "stdafx.h"
// - Interface # include
#include
Void filerun () {// - com Co. "--- invoke shellrun ---" << endl; ishelldispatch * shell = null; hResult hr = cocreateInstance (CLSID_SHELL, NULL, CLSCTX_SERVER , IID_IDISPATCH, (void **) & shell; if (failed (hr) ||! Shell) {cout << "interface failed." << endl; break;} shell-> fileerun (); // shell-> FindFiles (); / * Shell object methods The Shell object has the following methods: BrowseForFolder CascadeWindows ControlPanelItem EjectPC Explore FileRun FindComputer FindFiles Help MinimizeAll NameSpace Open RefreshMenu SetTime ShutdownWindows Suspend TileHorizontally TileVertically TrayProperties UndoMinimizeALL Windows * / shell-> Release (); cout << "--- ShellRun OK .---" << endl; break;} while (false); // - com coundialize ();
INT Main (int Argc, char * argv []) {fileerun (); return 0;}