Solved

Syntax error while declaring Global External Function in PowerBuilder 11.5

Posted on 2010-11-23
9
1,063 Views
Last Modified: 2013-12-26
I am trying to declare an global external function GetUsernameA in PowerBuilder 11.5 by as below:

Public FUNCTION boolean GetUsernameA( ref string userID, ref ulong len ) library "ADVAPI32.DLL"
I get syntax error for the above declaration.
Can anyone help to point out what is the issue with the above declaration? Also, in PB 11.5 do we need to set any system options to recognise the declaration for external functions?
0
Comment
Question by:adithya
[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
  • 5
  • 4
9 Comments
 
LVL 2

Expert Comment

by:kmanoharnaik
ID: 34196064
Hi,

Even I have 11.5 in my system , I could copy the syntax provided by you and no compile error occured.
do you have problem with only this ext.function declaration or with any?

Can you try adding alias name as follows at the end of declaration?

alias for "GetUserNameA;Ansi"

it would be Public FUNCTION boolean GetUsernameA( ref string userID, ref ulong len ) library "ADVAPI32.DLL" alias for "GetUserNameA;Ansi"

please let me know if it does not work.

thanks
msnaik


0
 

Author Comment

by:adithya
ID: 34196103
Hi,

Thanks for the response...
Even with aliasing it shows the syntax error. This happens to any external function declaration, not only to GetUsernameA... Any idea what could be the issue?
Thanks..
0
 
LVL 2

Expert Comment

by:kmanoharnaik
ID: 34196115
Hi,

oh is it so??

What is the syntax error, can you send the error message?

meanwhile i check the settings if i get any i will update you.

Thanks
msn
0
Industry Leaders: 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!

 

Author Comment

by:adithya
ID: 34196167
Enclosing the screen shot... It just says Syntax error.
We are basically accessing PowerBuilder 11.5 on a remote machine. Is this the reason ?
syntax-err.bmp
0
 
LVL 2

Expert Comment

by:kmanoharnaik
ID: 34196206
Hi,

you should select the global external from dropdown.

please see the screen shot in attached document.

let me know if you still cant fix the issue/.

thanks
msn

 Global-ext-function.doc
0
 
LVL 2

Expert Comment

by:kmanoharnaik
ID: 34196232
Hi,

please find the updated document which has screen shots

thanks
msn
Global-ext-function.doc
0
 

Author Comment

by:adithya
ID: 34196262
It worked.. Thanks a lot.. :)
0
 
LVL 2

Accepted Solution

by:
kmanoharnaik earned 500 total points
ID: 34196279

great!! ;-)

if it had helped you, please share the points.

Thanks in advance
msn

0
 

Author Closing Comment

by:adithya
ID: 34196998
excelleent response
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

Title # Comments Views Activity
eclipse find/step into stored procedure 3 213
Visual Studio 2010 and wwwroot level webconfig file 1 63
eclipse formatting 6 128
Recommendation vb6 to vb.net or others 14 241
In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

752 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