Solved

Problems calling external functions using PB12 and Windows 7

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

749 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