Solved

Problems calling external functions using PB12 and Windows 7

Posted on 2010-08-25
3
1,982 Views
Last Modified: 2012-05-10
We have a PowerBuilder 12 application that is crashing when calling an external function under Windows 7. The same application has earlier worked without problem under XP.

The call to the external function seems to work OK since a message box produced by the function displays, but the application then crashes when the user clicks OK to continue (the external function calculates the are of a block in the North sea).

The question is where does the failure occur - in the function itself (in which case it's not my problem) or when returning the calculated area to PB?

The function declaration is:

SUBROUTINE CalcArea(Long n, Long y[], Long x[], REF Double ar, REF Long ist) library 'GEODETIC.DLL' ALIAS FOR "_dllarea@20;Ansi"

where n is the number of co-ordinates, y & x are the y & x co-ordinates of the block for which the area is to be calculated, ar is the area returned to PB & ist is the return code, also returned to PB.

I suspect that the problem lies with the last two reference parameters, but is there anyone who has experienced (& hopefully solved) a similar problem?

Note that I've tried running the executable on Windows 7 with the /pbdebug switch but this for some reason failed to produce a trace log.
0
Comment
Question by:dds_felles
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Expert Comment

by:firozmusthafa
ID: 33519768
try running powerbuilder in administrator mode(right click and run as administrator), if that doesn't help try elevating to system privilege using sc screate PowerBuilder binPath= "your exe name" type= own type= interact
in command prompt then type sc start PowerBuilder

That could definitely solve the issue
0
 
LVL 1

Accepted Solution

by:
dds_felles earned 0 total points
ID: 33587124
Thanks for the input. Unfortunately we were a little premature in assuming that the problem was with PowerBuilder. We have discovered another (non-PowerBuilder application) that calls the same function and which also crashes when run under Windows 7.

Further investigation has shown that control actually passes into the function (a messagebox displays showing the nodes of the area to be calculated) before the crash occurs.

Both these pieces of evidence seem to indicate that the bug lies within the external function itself and thus the task of fixing the problem has been passed to someone else.

Thanks anyway.
0
 
LVL 1

Author Closing Comment

by:dds_felles
ID: 33587155
Problem is external to PowerBuilder.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the features I've come to appreciate about Windows 7 and Windows Server 2008 R2 is the ability to pin applications to the task bar. As useful a feature as I've found this, it does have some quirks.  For example, have you ever tried pinning an…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question