Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Error calling external function %s

4 posts in Objects Last posting was on 2009-11-10 01:13:06.0Z
Larry Posted on 2009-11-09 15:58:34.0Z
Sender: 58a4.4af839bb.1804289383@sybase.com
From: Larry
Newsgroups: sybase.public.powerbuilder.objects
Subject: Error calling external function %s
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4af83c2a.5917.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 9 Nov 2009 07:58:34 -0800
X-Trace: forums-1-dub 1257782314 10.22.241.41 (9 Nov 2009 07:58:34 -0800)
X-Original-Trace: 9 Nov 2009 07:58:34 -0800, 10.22.241.41
Lines: 36
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9947
Article PK: 737076

We have an application that is loaded on terminal server
that is starting to give us some problems.

We call a third party dll written in C that is giving us a
sparadic error. The users can access this dll 99/100 times,
but the 100 try it will fail with the 15 - Error calling
external function.

The problem is the fact that we cannot recreate the issue,
even if the problem occurs for a user and we log on and try
to get it to fail. No matter what we have tried both the
ansi and unicode calls are being used as we noticed that may
be the problem from reading the boards.

The functions are declared as....
FUNCTION int gef_apivcf(int commodity, ref double obstemp,
ref double obsgrav, ref double alttemp, ref double vcf, ref
double apigrav) LIBRARY "APIVCF.DLL" alias for
"_gef_apivcf@24;Ansi"


FUNCTION int gef_apivcf_retry(int commodity, ref double
obstemp, ref double obsgrav, ref double alttemp, ref double
vcf, ref double apigrav) LIBRARY "APIVCF.DLL" alias for
"_gef_apivcf@24;"

The first one is the Ansi version, the second is called if
the first fails with the unicode version.

We just tried this fix and it still didnt work. We have been
pullling our hair out with this issue as we cannot make it
fail. As stated before it works 99% of the time, but then
that 1% is causing a huge problem. If the user logs off the
terminal server and back on then it seems to work.

Any suggestions would be great!


Scott Morris Posted on 2009-11-09 18:53:43.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <4af83c2a.5917.1681692777@sybase.com>
Subject: Re: Error calling external function %s
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4af86537$1@forums-1-dub>
Date: 9 Nov 2009 10:53:43 -0800
X-Trace: forums-1-dub 1257792823 10.22.241.152 (9 Nov 2009 10:53:43 -0800)
X-Original-Trace: 9 Nov 2009 10:53:43 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9948
Article PK: 737074


> The problem is the fact that we cannot recreate the issue,
> even if the problem occurs for a user and we log on and try
> to get it to fail. No matter what we have tried both the
> ansi and unicode calls are being used as we noticed that may
> be the problem from reading the boards.
>
> The functions are declared as....
> FUNCTION int gef_apivcf(int commodity, ref double obstemp,
> ref double obsgrav, ref double alttemp, ref double vcf, ref
> double apigrav) LIBRARY "APIVCF.DLL" alias for
> "_gef_apivcf@24;Ansi"

There are no character-based arguments, so there is no unicode issue here.

>
>
> FUNCTION int gef_apivcf_retry(int commodity, ref double
> obstemp, ref double obsgrav, ref double alttemp, ref double
> vcf, ref double apigrav) LIBRARY "APIVCF.DLL" alias for
> "_gef_apivcf@24;"

Per the documentation, this is technically incorrect. The semicolon is
needed to use the ANSI keyword - which you don't need either.

>
> The first one is the Ansi version, the second is called if
> the first fails with the unicode version.
>
> We just tried this fix and it still didnt work. We have been
> pullling our hair out with this issue as we cannot make it
> fail. As stated before it works 99% of the time, but then
> that 1% is causing a huge problem. If the user logs off the
> terminal server and back on then it seems to work.

You don't have any unicode issues with the function here, so your attempted
fix has no real affect. Is this DLL developed inhouse? If so, make sure
your DLL developers understand the requirements for using the exported
function in PB.
http://www.sybase.com/detail?id=47626

If not, perhaps you can elaborate on your configuration. Seems you are
using at least PB10 - but specifically which version/build? If you are not
using a current version, have you looked through the fixlists from the later
builds to see if the problems has already been report/fixed. This might
also be a TS-specific problem - have you approached this issue from that
perspective? I have no terminal server experience, but does it have any
facilities to diagnose problems?


Jeremy Lakeman Posted on 2009-11-09 23:15:04.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Error calling external function %s
Date: Mon, 9 Nov 2009 15:15:04 -0800 (PST)
Organization: http://groups.google.com
Lines: 42
Message-ID: <96543623-6447-403b-8b88-30f0d8a215a5@r3g2000vbi.googlegroups.com>
References: <4af83c2a.5917.1681692777@sybase.com>
NNTP-Posting-Host: 203.122.242.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1257808504 26608 127.0.0.1 (9 Nov 2009 23:15:04 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 9 Nov 2009 23:15:04 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: r3g2000vbi.googlegroups.com; posting-host=203.122.242.105; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-Via: 1.1 fly.essential.com.au:3128 (squid/2.5.STABLE8), 1.0 asp.essential.intranet:3128 (squid/2.5.STABLE8)
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!novia!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!r3g2000vbi.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9949
Article PK: 737075


On Nov 10, 1:58 am, Larry wrote:
> We have an application that is loaded on terminal server
> that is starting to give us some problems.
>
> We call a third party dll written in C that is giving us a
> sparadic error. The users can access this dll 99/100 times,
> but the 100 try it will fail with the 15 - Error calling
> external function.
>
> The problem is the fact that we cannot recreate the issue,
> even if the problem occurs for a user and we log on and try
> to get it to fail. No matter what we have tried both the
> ansi and unicode calls are being used as we noticed that may
> be the problem from reading the boards.
>
> The functions are declared as....
> FUNCTION int gef_apivcf(int commodity, ref double obstemp,
> ref double obsgrav, ref double alttemp, ref double vcf, ref
> double apigrav) LIBRARY "APIVCF.DLL" alias for
> "_gef_apivcf@24;Ansi"
>
> FUNCTION int gef_apivcf_retry(int commodity, ref double
> obstemp, ref double obsgrav, ref double alttemp, ref double
> vcf, ref double apigrav) LIBRARY "APIVCF.DLL" alias for
> "_gef_apivcf@24;"
>
> The first one is the Ansi version, the second is called if
> the first fails with the unicode version.
>
> We just tried this fix and it still didnt work. We have been
> pullling our hair out with this issue as we cannot make it
> fail. As stated before it works 99% of the time, but then
> that 1% is causing a huge problem. If the user logs off the
> terminal server and back on then it seems to work.
>
> Any suggestions would be great!

I'd look at path variables, where the dll is on the machine, what the
current directory of the application is when it succeeds or fails, did
the user open a file saveas / open dialog to change the current
directory before it failed... things like that.


Wheeley Posted on 2009-11-10 01:13:06.0Z
From: Wheeley <wheeley@ix.netcom.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Error calling external function %s
Message-ID: <8bfhf558gard62hbgmg4eeolud58der6f0@4ax.com>
References: <4af83c2a.5917.1681692777@sybase.com>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 9 Nov 2009 17:13:06 -0800
X-Trace: forums-1-dub 1257815586 10.22.241.152 (9 Nov 2009 17:13:06 -0800)
X-Original-Trace: 9 Nov 2009 17:13:06 -0800, vip152.sybase.com
Lines: 45
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9950
Article PK: 737078

On 9 Nov 2009 07:58:34 -0800, Larry wrote:

I also have had this before and found that PB gives this also if the
DLL is locked for usage by another process. Basically it is busy doing
something else. Maybe a wait period might help when you get the error
and then retry x number of times.

Wheeley

>We have an application that is loaded on terminal server
>that is starting to give us some problems.
>
>We call a third party dll written in C that is giving us a
>sparadic error. The users can access this dll 99/100 times,
>but the 100 try it will fail with the 15 - Error calling
>external function.
>
>The problem is the fact that we cannot recreate the issue,
>even if the problem occurs for a user and we log on and try
>to get it to fail. No matter what we have tried both the
>ansi and unicode calls are being used as we noticed that may
>be the problem from reading the boards.
>
>The functions are declared as....
>FUNCTION int gef_apivcf(int commodity, ref double obstemp,
>ref double obsgrav, ref double alttemp, ref double vcf, ref
>double apigrav) LIBRARY "APIVCF.DLL" alias for
>"_gef_apivcf@24;Ansi"
>
>
>FUNCTION int gef_apivcf_retry(int commodity, ref double
>obstemp, ref double obsgrav, ref double alttemp, ref double
>vcf, ref double apigrav) LIBRARY "APIVCF.DLL" alias for
>"_gef_apivcf@24;"
>
>The first one is the Ansi version, the second is called if
>the first fails with the unicode version.
>
>We just tried this fix and it still didnt work. We have been
>pullling our hair out with this issue as we cannot make it
>fail. As stated before it works 99% of the time, but then
>that 1% is causing a huge problem. If the user logs off the
>terminal server and back on then it seems to work.
>
>Any suggestions would be great!