C++ DCOM server from VB Client (HOW?) 
Author Message
 C++ DCOM server from VB Client (HOW?)

I've created a DCOM server component using Visual C++ with a custom
interface (not IDispatch). The server will run on my own PC (NT4).

I've also written a client using VB5. I've added the server's type library
to the project. On my local system, the client/server work fine.

I also have a C++ client that works with the server. It gets shipped
with a proxy/stub DLL. No problems there, either.

Two questions:

1) HOW do I configure/distribute the VB client so that it knows where the
server is?

I've seen one knowledge-base article (Q161837) - however in that article
both
 client and server are built with VB, and there's a .VBR file. I don't have
a .VBR
file because my server was built with C++.

Currently I get error 429. But I'm not surprised it doesn't work, because
I've not specified a server anywhere.

2) If I want the VB client to specify the server name at RUN-TIME, how
   should I do that? (That's how my C++ client already works)




Mon, 01 May 2000 03:00:00 GMT  
 C++ DCOM server from VB Client (HOW?)

Use something like my DCOM bridge
(http://www.wam.umd.edu/~mikenel/dcom/dcombrdg.zip) to connect to abitrary
remote objects. It's a COM object written in C++ which allows you to use the
CoCreateInstanceEx() API.

-mike

: I've created a DCOM server component using Visual C++ with a custom
: interface (not IDispatch). The server will run on my own PC (NT4).

: I've also written a client using VB5. I've added the server's type library
: to the project. On my local system, the client/server work fine.

: I also have a C++ client that works with the server. It gets shipped
: with a proxy/stub DLL. No problems there, either.

: Two questions:

: 1) HOW do I configure/distribute the VB client so that it knows where the
: server is?

: I've seen one knowledge-base article (Q161837) - however in that article
: both
:  client and server are built with VB, and there's a .VBR file. I don't have
: a .VBR
: file because my server was built with C++.

: Currently I get error 429. But I'm not surprised it doesn't work, because
: I've not specified a server anywhere.

: 2) If I want the VB client to specify the server name at RUN-TIME, how
:    should I do that? (That's how my C++ client already works)



Mon, 01 May 2000 03:00:00 GMT  
 C++ DCOM server from VB Client (HOW?)

I've created a DCOM server component using Visual C++ with a custom
interface (not IDispatch). The server will run on my own PC (NT4).

I've also written a client using VB5. I've added the server's type library
to the project. On my local system, the client/server work fine.

I also have a C++ client that works with the server. It gets shipped
with a proxy/stub DLL. No problems there, either.

Two questions:

1) HOW do I configure/distribute the VB client so that it knows where the
server is?

I've seen one knowledge-base article (Q161837) - however in that article
both
 client and server are built with VB, and there's a .VBR file. I don't have
a .VBR
file because my server was built with C++.

Currently I get error 429. But I'm not surprised it doesn't work, because
I've not specified a server anywhere.

2) If I want the VB client to specify the server name at RUN-TIME, how
   should I do that? (That's how my C++ client already works)




Mon, 01 May 2000 03:00:00 GMT  
 C++ DCOM server from VB Client (HOW?)

Have you thought about using CoCreateInstanceEx() in your VB to get to your
server object? I dont know if it is possible or not but you might be able to
call this function as you call any Win32 apis.

-Jalil

Quote:

>I've created a DCOM server component using Visual C++ with a custom
>interface (not IDispatch). The server will run on my own PC (NT4).

>I've also written a client using VB5. I've added the server's type library
>to the project. On my local system, the client/server work fine.

>I also have a C++ client that works with the server. It gets shipped
>with a proxy/stub DLL. No problems there, either.

>Two questions:

>1) HOW do I configure/distribute the VB client so that it knows where the
>server is?

>I've seen one knowledge-base article (Q161837) - however in that article
>both
> client and server are built with VB, and there's a .VBR file. I don't have
>a .VBR
>file because my server was built with C++.

>Currently I get error 429. But I'm not surprised it doesn't work, because
>I've not specified a server anywhere.

>2) If I want the VB client to specify the server name at RUN-TIME, how
>   should I do that? (That's how my C++ client already works)





Tue, 02 May 2000 03:00:00 GMT  
 C++ DCOM server from VB Client (HOW?)

To do this you would also have to map the COSERVERINFO structure in VB, I
think if you look in the DCOM archives of Microsofts listserver you can
find a reference on how to do it.  You could also use DCOMCNFG to indicate
to your VB client what machine to run the server on, but not a run-time.



Quote:
> Have you thought about using CoCreateInstanceEx() in your VB to get to
your
> server object? I dont know if it is possible or not but you might be able
to
> call this function as you call any Win32 apis.

> -Jalil


> >I've created a DCOM server component using Visual C++ with a custom
> >interface (not IDispatch). The server will run on my own PC (NT4).

> >I've also written a client using VB5. I've added the server's type
library
> >to the project. On my local system, the client/server work fine.

> >I also have a C++ client that works with the server. It gets shipped
> >with a proxy/stub DLL. No problems there, either.

> >Two questions:

> >1) HOW do I configure/distribute the VB client so that it knows where
the
> >server is?

> >I've seen one knowledge-base article (Q161837) - however in that article
> >both
> > client and server are built with VB, and there's a .VBR file. I don't
have
> >a .VBR
> >file because my server was built with C++.

> >Currently I get error 429. But I'm not surprised it doesn't work,
because
> >I've not specified a server anywhere.

> >2) If I want the VB client to specify the server name at RUN-TIME, how
> >   should I do that? (That's how my C++ client already works)





Wed, 03 May 2000 03:00:00 GMT  
 C++ DCOM server from VB Client (HOW?)

Quote:
>>1) HOW do I configure/distribute the VB client so that it knows where the

server is?

Just use the DCOM Configurator. (DCOMGNFG.EXE). This will create the
necessary registry entries describing the location of your server. You
don't have to change anything to your code. The binaries shoudl remain
unchanged.

Regards.

--

Patrick Philippot

-pp (MainSoft sarl)
------------------------------------



http://ourworld.compuserve.com/homepages/mainsoft
tel/fax: +33 (0)1 69 40 94 85



Wed, 03 May 2000 03:00:00 GMT  
 C++ DCOM server from VB Client (HOW?)

Quote:
> Just use the DCOM Configurator. (DCOMGNFG.EXE). This will create the
> necessary registry entries describing the location of your server. You
> don't have to change anything to your code. The binaries shoudl remain
> unchanged.

Hi,

I am writing an automation compatible toolkit that will let you change the
DCOM registry rather than using DCOMCNFG.EXE.

The toolkit will also let you create objects from within VB on any machine
as well.

The URL www.arpsolutions.demon.co.uk will probably be live in a couple of
weeks at which time I will post the active-x controls and samples for VB
etc.  It might be sooner.

Drop me an e-mail if you require more details.

Regards,




Sat, 13 May 2000 03:00:00 GMT  
 C++ DCOM server from VB Client (HOW?)

Or you can download my DCOM bridge at
http://www.wam.umd.edu/~mikenel/dcom/dcombrdg.zip and have fun today :-).

-mike

: > Just use the DCOM Configurator. (DCOMGNFG.EXE). This will create the
: > necessary registry entries describing the location of your server. You
: > don't have to change anything to your code. The binaries shoudl remain
: > unchanged.

: Hi,

: I am writing an automation compatible toolkit that will let you change the
: DCOM registry rather than using DCOMCNFG.EXE.

: The toolkit will also let you create objects from within VB on any machine
: as well.

: The URL www.arpsolutions.demon.co.uk will probably be live in a couple of
: weeks at which time I will post the active-x controls and samples for VB
: etc.  It might be sooner.

: Drop me an e-mail if you require more details.

: Regards,




Mon, 15 May 2000 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. VB ADO Client and Delphi DCOM Server

2. Install OLE Server for DCOM, Server and Client

3. DCOM server hangs: Win2000 client / NT server problem

4. Ole Server Vb, Ole Client C/C++

5. Setting up interface class between VB server and C++ client

6. a major problem: vb client of a c++ dll com server

7. VB client of C++ DLL COM server

8. DCOM settings needed on client and server for remote Outlook application

9. vb5 - DCOM - RS232 - Client server

10. How do I identify client from a DCOM server

11. DCOM client/server programming with Visual Basic

12. Q: DCOM Client/Server with VB5 ?

 

 
Powered by phpBB® Forum Software