Microsoft KB Archive/175510

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


SAMPLE: VB5DCOM.EXE: Using Callbacks and WithEvents with DCOM

Article ID: 175510

Article Last Modified on 8/9/2004



APPLIES TO

  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual Basic 6.0 Enterprise Edition



This article was previously published under Q175510

SUMMARY

VB5DCOM.EXE is a Visual Basic sample application that demonstrates how to use WithEvents and CallBacks remotely via DCOM (Distributed Component Object Model).

NOTE: Building DCOM Application with Microsoft Visual Basic is only enabled in the Enterprise Editions of Visual Basic 5.0 and 6.0.

MORE INFORMATION

If you are using Visual Basic 6.0, see the following Microsoft Knowledge Base articles:

266717 HOWTO: Create a DCOM Client/Server Application by Using Visual Basic


267836 HOWTO: Create a DCOM Client/Server with Events by Using Visual Basic


For additional help on how to set security and how to troubleshoot DCOM issues, see the following articles in the Microsoft Knowledge Base:

268550 HOWTO: Use Dcomcnfg for a Visual Basic DCOM Client/Server Application


269330 HOWTO: Troubleshoot DCOM for Visual Basic Client/Server Applications


VB5DCOM.EXE also addresses all of the security settings that are required to make DCOM function correctly with Visual Basic using DCOM Config. It even demonstrates how to check a client machines registry to confirm that DCOM is installed on Windows 95 platforms and enabled on Windows NT, Windows 2000, and Windows 98. If DCOM is not present on the Windows 95 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 Download Center:

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services


Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

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:

161837 HOWTO: Create a DCOM Client/Server Application


266717 HOWTO: Create a DCOM Client/Server Application by Using Visual Basic


267836 HOWTO: Create a DCOM Client/Server with Events by Using Visual Basic


268550 HOWTO: Use Dcomcnfg for a Visual Basic DCOM Client/Server Application


269330 HOWTO: Troubleshoot DCOM for Visual Basic Client/Server Applications



Additional query words: Permissions

Keywords: kbinfo kbdownload kbfile kbdcom kbsample KB175510