--------------------------------- Automation --------------------------------- - See Chapter 5 "Automation and Component Categories" for information on Automation and IDispatch - See Chapter 8 "DLL Surrogates and Executable Components" for information on DLL Surrogates Minimum System Requirements =========================== Windows 95 with DCOM installed or Windows NT 4.0 Visual C++ 5.0 Professional Visual Basic 5.0 Professional Microsoft Internet Explorer 3.02 (or higher) Microsoft Word (for CallWord sample) Automation Component and C++ Client (local) =========================================== 1. Open Automation.dsw in Visual C++ 2. Build Client.exe (this also builds Component.dll) 3. Register Component.dll 4. Run Client.exe to test Automation Component and C++ Client (remote) ============================================ - Local computer can be Windows 95 with DCOM or Windows NT 4.0 - Remote computer must be Windows NT 4.0 - In this sample, since the component is a DLL running on a remote computer, a DLL surrogate is required. NOTE: If it is present, you will need to delete the HKEY_CLASSES_ROOT\CLSID\{10000002-0000-0000-0000-000000000001}\LocalServer32 registry key on the local computer in order to test this remote sample. 1. Open Automation.dsw in Visual C++ 2. Build Client.exe (this also builds Component.dll) 3. Copy Component.dll to local computer 4. Configure the following registry entries on local computer: (Remote_Computer_Name should contain the name of remote computer) [HKEY_CLASSES_ROOT\CLSID\{10000002-0000-0000-0000-000000000001}] "AppID"="{10000002-0000-0000-0000-000000000001}" [HKEY_CLASSES_ROOT\AppID\{10000002-0000-0000-0000-000000000001}] @="Inside DCOM Sample" "RemoteServerName"="Remote_Computer_Name" 5. Copy Component.dll to remote computer 6. Register Component.dll on remote computer 7. Configure the following registry entries on remote computer: [HKEY_CLASSES_ROOT\CLSID\{10000002-0000-0000-0000-000000000001}] "AppID"="{10000002-0000-0000-0000-000000000001}" [HKEY_CLASSES_ROOT\AppID\{10000002-0000-0000-0000-000000000001}] @="Inside DCOM Sample" "DllSurrogate"="" 8. Run Client.exe on local computer to test Automation Component and Visual Basic Client ============================================ 1. If you haven't already, build and register Component.dll created in "Automation Component and C++ Client (local)" above 2. Open VBClient.vbp in Visual Basic 3. Run and click on Form1 to test Using Internet Explorer and VBScript to Call Automation Component ================================================================= 1. If you haven't already, build and register Component.dll created in "Automation Component and C++ Client (local)" above 2. Open VBScript.html in Internet Explorer to test NOTE: It may be necessary to adjust Internet Explorer's security settings Create Instance of Word and Use Automation to Set Visible Property ================================================================== Requires Microsoft Word 1. Open CallWord.dsw in Visual C++ 2. Build CallWord.exe 3. Run CallWord.exe to test