Solved

Problems calling external functions using PB12 and Windows 7

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

I hope this helps those who have been battling the SanDisk / U3 problem for a while. For anyone that is running Windows 7 64bit and is receiving and searching the internet for the “Windows Error: Windows has allocated a drive letter to the U3 dri…
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now