proxy/stub usage 
Author Message
 proxy/stub usage

Hi all,

I've created an EXE COM in ATL for the first time, and I'm not completely
sure how to make use of the P/S dll.  I'm using VC7 and my configuration is
such:  The EXE will be on a remote machine, the client accessing it will be
local (presumably with the P/S DLL).  I generally use #import, but some
things haven't made sense in my head about how this works yet.  If I
CoCreateInstanceEx on the DLL, how does the DLL know to look at the remote
machine?  Does the DLL have the capability to make use of the pServerInfo
parameter?

TIA!
-Dale



Mon, 29 Aug 2005 00:53:09 GMT  
 proxy/stub usage
You will have to compile P/S DLL and register it on clients pc.
The using dcomcnfg.exe you can specify ip address of the server.

George.


Quote:
> Hi all,

> I've created an EXE COM in ATL for the first time, and I'm not completely
> sure how to make use of the P/S dll.  I'm using VC7 and my configuration
is
> such:  The EXE will be on a remote machine, the client accessing it will
be
> local (presumably with the P/S DLL).  I generally use #import, but some
> things haven't made sense in my head about how this works yet.  If I
> CoCreateInstanceEx on the DLL, how does the DLL know to look at the remote
> machine?  Does the DLL have the capability to make use of the pServerInfo
> parameter?

> TIA!
> -Dale



Mon, 29 Aug 2005 04:54:11 GMT  
 proxy/stub usage
Ah, very cool, thanks.  One question about dcomcnfg and the clients...
under location it warns that a client might override these settings.  How
would I go about this in a client?  For instance, say I had the PS on the
client machine but there were 5 different machines with the server EXE on
them, and I wanted to choose at runtime (via dialog) which one to connect
to?

Thanks!
-Dale


Quote:
> You will have to compile P/S DLL and register it on clients pc.
> The using dcomcnfg.exe you can specify ip address of the server.

> George.



> > Hi all,

> > I've created an EXE COM in ATL for the first time, and I'm not
completely
> > sure how to make use of the P/S dll.  I'm using VC7 and my configuration
> is
> > such:  The EXE will be on a remote machine, the client accessing it will
> be
> > local (presumably with the P/S DLL).  I generally use #import, but some
> > things haven't made sense in my head about how this works yet.  If I
> > CoCreateInstanceEx on the DLL, how does the DLL know to look at the
remote
> > machine?  Does the DLL have the capability to make use of the
pServerInfo
> > parameter?

> > TIA!
> > -Dale



Mon, 29 Aug 2005 05:50:57 GMT  
 proxy/stub usage
Dale,

If your client is running VB, use the optional second parameter to the
CreateObject method. If it is running C++ you will have to use the pwszName
member of the COSERVERINFO sttucture.

Dave Smith


Quote:
> Ah, very cool, thanks.  One question about dcomcnfg and the clients...
> under location it warns that a client might override these settings.  How
> would I go about this in a client?  For instance, say I had the PS on the
> client machine but there were 5 different machines with the server EXE on
> them, and I wanted to choose at runtime (via dialog) which one to connect
> to?

> Thanks!
> -Dale



> > You will have to compile P/S DLL and register it on clients pc.
> > The using dcomcnfg.exe you can specify ip address of the server.

> > George.



> > > Hi all,

> > > I've created an EXE COM in ATL for the first time, and I'm not
> completely
> > > sure how to make use of the P/S dll.  I'm using VC7 and my
configuration
> > is
> > > such:  The EXE will be on a remote machine, the client accessing it
will
> > be
> > > local (presumably with the P/S DLL).  I generally use #import, but
some
> > > things haven't made sense in my head about how this works yet.  If I
> > > CoCreateInstanceEx on the DLL, how does the DLL know to look at the
> remote
> > > machine?  Does the DLL have the capability to make use of the
> pServerInfo
> > > parameter?

> > > TIA!
> > > -Dale



Mon, 29 Aug 2005 07:58:18 GMT  
 proxy/stub usage
Ha, I saw that but thought "surely it's not that easy".  ;)

Thanks !
-Dale


Quote:
> Dale,

> If your client is running VB, use the optional second parameter to the
> CreateObject method. If it is running C++ you will have to use the
pwszName
> member of the COSERVERINFO sttucture.

> Dave Smith



> > Ah, very cool, thanks.  One question about dcomcnfg and the clients...
> > under location it warns that a client might override these settings.
How
> > would I go about this in a client?  For instance, say I had the PS on
the
> > client machine but there were 5 different machines with the server EXE
on
> > them, and I wanted to choose at runtime (via dialog) which one to
connect
> > to?

> > Thanks!
> > -Dale



> > > You will have to compile P/S DLL and register it on clients pc.
> > > The using dcomcnfg.exe you can specify ip address of the server.

> > > George.



> > > > Hi all,

> > > > I've created an EXE COM in ATL for the first time, and I'm not
> > completely
> > > > sure how to make use of the P/S dll.  I'm using VC7 and my
> configuration
> > > is
> > > > such:  The EXE will be on a remote machine, the client accessing it
> will
> > > be
> > > > local (presumably with the P/S DLL).  I generally use #import, but
> some
> > > > things haven't made sense in my head about how this works yet.  If I
> > > > CoCreateInstanceEx on the DLL, how does the DLL know to look at the
> > remote
> > > > machine?  Does the DLL have the capability to make use of the
> > pServerInfo
> > > > parameter?

> > > > TIA!
> > > > -Dale



Mon, 29 Aug 2005 08:37:30 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. COM proxies and stubs in C#

2. Proxy Stub Problem with Visual C++ 7

3. Merge Proxy/stub (in ATL) generated DLL does not change the Proxystubclsid32

4. Proxy Stub Dll

5. poblem in making proxy stub DLL from *.mk file

6. IDL problem : setting Interface inside or outside typelib / Proxy stub vs Aggregation

7. ATL COM DLL without proxy/stub

8. Proxy Stub

9. nmake on proxy/stub results in unresolved externals

10. How to generate the proxy/stub with VC.NET

11. Registering proxy/stub for Side by Side COM Components

12. stub-proxy has release/debug build?

 

 
Powered by phpBB® Forum Software