Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Write Simple Hello World Program in DCOM

Status
Not open for further replies.

pressfone

Programmer
Jul 17, 2001
1
IN
Hi Every body
Could you Please help me out how to write a hello world server and client in DCOM.
DP
 
Your question is too ambiguous. It deppends on what do you want to make, a server or a client. This is the smallest DCOM program.

#include<iostream.h>
#include<ole2.h>
int main()
{
HRESULT hr=CoInitialize(NULL);
if(FAILED(hr))return 1;
cout<<&quot;succesfull initialized&quot;<<endl;
CoUninitialize();
return 0;
} John Fill
1c.bmp


ivfmd@mail.md
 
You can find a VC++ example in the following tutorial:
Overview: COM Tutorial Programming Samples

An older VB example can be found here:
HOWTO: Create a DCOM Client/Server Application

There are several other examples in the MSDN. You may find the following KB article handy when searching the MSDN for DCOM/COM related articles:
HOWTO: Search for COM and DCOM Knowledge Base Articles
Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top