DOCUMENT:Q175510 24-OCT-1997 [vbwin] TITLE :FILE: VB5DCOM.EXE: Using Callbacks and WithEvents with DCOM PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:5.0 OPER/SYS:NT Win95 WINDOWS KEYWORDS:vb5all kbsample ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Control Creation, Learning, Professional, and Enterprise Editions for Windows, version 5.0 on the following platforms: NT, Win95 --------------------------------------------------------------------- SUMMARY ======= VB5DCOM.EXE is a Visual Basic 5.0 sample application that demonstrates how to use WithEvents and CallBacks remotely via DCOM. MORE INFORMATION ================ It also addresses all of the security settings that are required to make DCOM function correctly with Visual Basic 5.0 using DCOM Config. It even demonstrates how to check a client machines registry to confirm that DCOM is installed on WIN95 platforms and enabled on WINNT platforms. If DCOM is not present on the WIN95 machine, then it presents the user with the opportunity to immediately download the necessary DCOM files from the Microsoft web site. The following file is available for download from the Microsoft Software Library: ~ Vb5dcom.exe - 44KB Self-extracting zipfile, readme.txt For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q119591 TITLE : How to Obtain Microsoft Support Files from Online Services MORE INFORMATION ================ Place the file Vb5dcom.exe in a root directory of a drive that has at least 150KB of available space. This a self-extracting executable so it will create the proper folders for you and place all the files in their respective locations. Execute the file Vb5dcom.exe. You will now have a DCOMDemo folder with separate Client and Server folders. Open the server project \DCOMDemo\Server\DCOMDemoServer.vbp. In the project's properties, make sure that the "remote server files" option on the component tab is checked and make an executable of the server. The server will now be registered on your machine and you will have a .vbr file containing the registry entries for the server. Close the server project. Open the client project \DCOMDemo\Client\DCOMDemoClient.vbp. Set a reference to the DCOMDemoServer in the projects references. Run the project locally to check for problems before distributing to other machines for testing remotely. See the included file \DCOMDemo\Permissions.txt if you encounter problems (such as Error 70 - Permission denied). REFERENCES ========== For more information about distributing DCOM applications, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q161837 TITLE : HOWTO: Create a DCOM Client/Server Application Additional query words: Permissions ====================================================================== Keywords : vb5all kbsample Version : WINDOWS:5.0 Platform : NT Win95 WINDOWS ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1997.