// - Connect the code for the browser shell window
// connshell.cpp: defines the entry point for the console application.///
#include "stdafx.h"
// # import "shdocvw.dll" exclude ( "tagREADYSTATE") # import "shdocvw.dll" // # import "shdocvw.dll" rename_namespace ( "SHELL_WINDOW") // using namespace SHELL_WINDOW; #define SHELL_WINDOW SHDocVw
#include
INT Main (int Argc, char * argv []) {cout << "--- Test ---" << endl; // - COM COINITIALIZE (NULL); Do {cout << "--- list all Shell window --- "<< endl;
SHELL_WINDOW :: IShellWindowsPtr msp_SHWinds = NULL; HRESULT hr = msp_SHWinds.CreateInstance (__ uuidof (SHELL_WINDOW :: ShellWindows)); ". FAILED" if (! S_OK = hr || NULL == msp_SHWinds) {cout << << endl; break } Int count = 0; int count = msp_shwinds-> getCount (); for (int i = 0; i
sp_browser.release ();}} msp_shwinds.release ();
COUT << "--- list count =" << count << "---" << endl; break;} while (false); // - com // counitialize (); // - ?? ? OleunInitialize (); return 0;}