Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DCOM and the IStrings interface with OLEnterprise

62 views
Skip to first unread message

Charles Little

unread,
Nov 23, 1998, 3:00:00 AM11/23/98
to
I am developing a distributed application using OLEnterprise, and have run
across a serious problem. I need to pass lists of parameters, so am storing
them in a string list, using GetOLEStrings to get an IStrings interface to
it, then passing it to the server. The problem is, it works in a
non-distributed environment, but fails even in the simplest case
distributed. I have tried a few different approches, including defining the
parameter as IStrings, defining the Parameter as IUnknown, hard casting is
as IDispatch, and soft casting it to IStrings, and Defining the paramter as
a variant, soft casting it as IDispatch, and hard casting it to IStrings,
but even though all of them work non-distributed, they all totally fail
distributed.

Thoughts?

_________________________________________________
Charles Little
Software Engineer
e-mail: charles...@zcsterling.com, cli...@infinite-visions.com;
voice: 770.226.1915
_________________________________________________
Programming is an art form that fights back
Profanity is the one language all programmers understand
Sleep is for people that can't program
In /dev/null no one can hear you scream


Dan Miser (TeamB)

unread,
Nov 24, 1998, 3:00:00 AM11/24/98
to
See my response in the thread "IStrings and TStrings" from
11/20/98. Let me know if that doesn't work.
--
Dan Miser
http://www.execpc.com/~dmiser


Dan Miser (TeamB)

unread,
Nov 25, 1998, 3:00:00 AM11/25/98
to
Make sure STDVCL40.DLL (for Delphi 4) or STDVCL32.DLL (for Delphi 3) is
deployed and registered on both the server and the client. That should
hopefully clear it up.

Charles Little

unread,
Nov 25, 1998, 3:00:00 AM11/25/98
to
>See my response in the thread "IStrings and TStrings" from
>11/20/98. Let me know if that doesn't work.
No, that did not work. I received an EIntfCastError witht he message
"Interface not Supported" distributed. It did work non-destributed,
however, just like all of the other cases.
__________________________________________________

Charles Little
Software Engineer
e-mail: charles...@zcsterling.com, cli...@infinite-visions.com; voice:
770.226.1915
__________________________________________________

Charles Little

unread,
Nov 25, 1998, 3:00:00 AM11/25/98
to

Dan Miser (TeamB) wrote...

>Make sure STDVCL40.DLL (for Delphi 4) or STDVCL32.DLL (for Delphi 3) is
>deployed and registered on both the server and the client. That should
>hopefully clear it up.
No, that did not. But I did find an unusual thing...
The IStrings comes across as a variant, and the Exception is occurring on
the soft cast (as IStrings). If I separate the soft cast out, there is no
exception(the variable is not useable, however...)

If I do nothing to the IStrings when it comes across, I can use it directly
from the appserver, and it comes across fine, i.e. on the client:

var
idx: Integer;
begin
with RemoteServer1 do
begin
for idx := 0 to AppServer.MyStrings.Count -1 do
begin
Memo1.Lines.Add(AppServer.MyStrings[idx]);
end;
end;
end;

This works...I am now totally confused...

Dan Miser [TeamB]

unread,
Nov 25, 1998, 3:00:00 AM11/25/98
to
I've tested this over multiple machines and it works with no problems.
That points to a configuration issue on your end. I would start by
looking through regedit for the string "stdvcl" and fix up any invalid
references.

It looks like you are using D3. Make sure the copy of STDVCL32.DLL you
have registered on both machines is the latest version of that DLL.
(I've got 8/5/97 3:01 am - 345,536 on my system). Also make sure you
only have one copy of the DLL on these systems.

Please post MIDAS-related messages in inprise.public.midas

Charles Little

unread,
Nov 27, 1998, 3:00:00 AM11/27/98
to
Actually, I am using D4 C/S with patch 2. I am checking configuration
issues now, but i just wanted to make sure that your test scenario is being
done distributed, i.e. client on one machine, broker(if used) on another,
and server on another...

If it will help, I can send you my examples...just let me know.
Dan Miser [TeamB] wrote in message ...

Dan Miser [TeamB]

unread,
Nov 28, 1998, 3:00:00 AM11/28/98
to
OK, then you will need the latest version of STDVCL40.DLL, so make sure
your registry contains the proper declarations for that instead of
STDVCL32.DLL. When using Delphi 4, you should use the
TDispatchConnection components, as opposed to TRemoteServer.

And to answer your question, yes, the test I performed was with the
client on one machine and the server on another.

Charles Little

unread,
Nov 30, 1998, 3:00:00 AM11/30/98
to

Dan Miser [TeamB] wrote in message ...
>OK, then you will need the latest version of STDVCL40.DLL, so make sure
>your registry contains the proper declarations for that instead of
>STDVCL32.DLL.
The StdVCL40.dll is registered correctly, but without the StdVCL32.dll
registered, also, I receive a "Library not registered" error.

>When using Delphi 4, you should use the
>TDispatchConnection components, as opposed to TRemoteServer.
>
I am using the TOLEnterpriseConnection component on the client, and have an
Object Factory running with the server exported on the server.

Dan Miser [TeamB]

unread,
Nov 30, 1998, 3:00:00 AM11/30/98
to
It sounds like things aren't registered properly then. Start by
unregistering stdvcl32.dll and stdvcl40.dll. Then search through the
registry for any mention of stdvcl. Are any references left to stdvcl?
Lastly, register the stdvcl40.dll again (only) on both computers.

If this doesn't do it, let me know and I'll post my sample to my web
site. It will take a little while because I'll be pretty scarce here
for the next couple of weeks.

Lastly, just use DCOMConnection for now until this problem is solved to
remove extra layers.

Charles Little

unread,
Nov 30, 1998, 3:00:00 AM11/30/98
to
Dan Miser [TeamB] wrote in message ...
>It sounds like things aren't registered properly then. Start by
>unregistering stdvcl32.dll and stdvcl40.dll. Then search through the
>registry for any mention of stdvcl. Are any references left to stdvcl?
>Lastly, register the stdvcl40.dll again (only) on both computers.
>
To shortcut things, I tested the problem on another set of computers, and it
worked. So it seems to be a configuration problem, as you suspected.
Thanks for your help. I'll look into it from here...

Charles Little

unread,
Nov 30, 1998, 3:00:00 AM11/30/98
to

Charles Little wrote in message <73uqsa$m0...@forums.borland.com>...
More information. I did have a configuration problem, and I cleared that
up. Once I did, the DCOMConnection worked fine. However, the OLEnterprise
connection gives an 'Interface not supported' error. I tried this on two
different clients with the same result. The project was the same as your
example.

Dan Miser [TeamB]

unread,
Dec 4, 1998, 3:00:00 AM12/4/98
to
Probably due to OLEnterprise's late-binding requirements. If this is
your only problem, then I would use the Text property of the TStrings
and pass it across as a Widestring.

Charles Little

unread,
Dec 7, 1998, 3:00:00 AM12/7/98
to
I was under the impression that the text property of the TStrings was
limited to 255 characters. Is this true?

Dan Miser [TeamB] wrote in message ...

Dan Miser (TeamB)

unread,
Dec 7, 1998, 3:00:00 AM12/7/98
to
The limitation of 255 characters exists in all short strings (found in all
Delphi 1 strings and those declared as shortstring). Otherwise, there is a
2GB limit. Take a look at the online help for "long string types" for more
information.

Charles Little wrote in message <74grnr$7s...@forums.borland.com>...

Charles Little

unread,
Dec 7, 1998, 3:00:00 AM12/7/98
to
Thanks for all of your help. Just for information, the variant can be used
as an interface to the remote string list. This does not help me, but it
may help someone else...


0 new messages