Solved

Problems calling external functions using PB12 and Windows 7

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
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.

808 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