Article View: borland.public.cppbuilder.database.multi-tier
Article #642Problem binding dispatch interface when client runs under WinNT
From: John Graham
Date: Sat, 26 May 2001 11:58
Date: Sat, 26 May 2001 11:58
44 lines
2381 bytes
2381 bytes
Help!
I recently ported a BCB4 nTier app., developed on a PC running Win NT,
to BCB5 running under Win 2000. Both the client and app. server
applications run fine on the Win 2000 PC. However, when I run the
client on an NT PC, I get an error attempting to bind the dispatch
interface.
The client uses the Bind() method of the TAutoDriver class this way:
SMSrvrDisp = new ISysManSrvrRDMDisp();
SMSrvrDisp->Bind(WideString(SysManScktConnect->ServerName));
if ( !SMSrvrDisp->IsBound() )
{
Application->MessageBox("Can't Bind Dispatch Interface -
Aborting!", "Rats!", MB_ICONEXCLAMATION);
Application->Terminate();
}
If I comment the error trap out, the BCB5 client runs fine on the NT
machine. It connects to the app. server on the Win 2000 PC and can
write to and read from an MS SQL Server 7 database so long as I don't
try to call an app. server method using the dispatch interface. Looks
like something is wrong with the way I'm trying to bind the interface.
Conversely, if I employ the Bind() syntax used in the BCB4 version of
the client,
SMSrvrDisp->Bind(LPDISPATCH(SysManScktConnect->AppServer));,
It errors when both client and server are running on the 2000 machine as
well.
The BCB4 version of this app. developed on the NT PC allows the client
to run under any Windows OS ( 95 and above ) with the app. server
running on any of our NT servers.
What am I missing?
Regards,
John
Technical Details
Message-ID:
<3B0F9A6F.C6FC53AA@salts.navy.mil>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd2b,2db86c1267ba4a12,start X-Google-Attributes: gidfcd2b,public X-Google-ArrivalTime: 2001-05-26 05:13:51 PST Message-ID: <3B0F9A6F.C6FC53AA@salts.navy.mil> Date: Sat, 26 May 2001 07:58:39 -0400 From: John Graham <jgraham@salts.navy.mil> Organization: SALTS Central X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.multi-tier Subject: Problem binding dispatch interface when client runs under WinNT Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 163.12.6.113 X-Trace: dnews 990878313 163.12.6.113 (26 May 2001 04:58:33 -0700) Lines: 47 Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews