Solved

Problems calling external functions using PB12 and Windows 7

Posted on 2010-08-25
3
1,965 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
  • 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

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 try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…

803 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