PowerBuilder API Call Problem

I have a PowerBuilder application running under PB 6.5 and Win NT.  I am
running a WinAPI function, GetWindowsDirectory.
It is initialized by the following declaration:
Function long GetWindowsDirectory(String lpBuffer, Long nSize) LIBRARY
"kernel32.DLL"  Alias For "GetWindowsDirectoryA"

In a window function I make a call to GetWindowsDirectory like this:

string sWinDir
long lReturn
long iSysPath
 
lSysPath = 256
sWinDir = space(lSysPath)
lReturn = GetWindowsDirectory(sWinDir, lSysPath)

lReturn returns 8, but sWinDir is empty.  The code works in Visual
Basic.

Any suggestions?

Thanks,

James Johnson
0
jjohnso9
7/26/1999 3:35:55 PM
sybase.powerbuilder.web-pb 1541 articles. 0 followers. Follow

1 Replies
553 Views

Similar Articles

[PageSpeed] 4

Try:

                                   VVV
Function long GetWindowsDirectory( REF String lpBuffer, Long nSize) LIBRARY
"kernel32.DLL"  Alias For "GetWindowsDirectoryA"

Note the "REF", which tells PB that you want to return data in the argument.

On Mon, 26 Jul 1999 11:35:55 -0400,
 in powersoft.public.powerbuilder.web-pb
 <jjohnso9@ix.netcom.com> wrote: 
>I have a PowerBuilder application running under PB 6.5 and Win NT.  I am
>running a WinAPI function, GetWindowsDirectory.
>It is initialized by the following declaration:
>Function long GetWindowsDirectory(String lpBuffer, Long nSize) LIBRARY
>"kernel32.DLL"  Alias For "GetWindowsDirectoryA"
>
>In a window function I make a call to GetWindowsDirectory like this:
>
>string sWinDir
>long lReturn
>long iSysPath
> 
>lSysPath = 256
>sWinDir = space(lSysPath)
>lReturn = GetWindowsDirectory(sWinDir, lSysPath)
>
>lReturn returns 8, but sWinDir is empty.  The code works in Visual
>Basic.
>
>Any suggestions?
>
>Thanks,
>
>James Johnson

---
Bruce Armstrong [TeamSybase]            | Romac/Source International
mailto:Bruce.Armstrong@teamsybase.com   | mailto:jobs@sourcela.com
                                        | http://www.romac-source.com

Preach the gospel at all times. If necessary, use words. [Francis of Assisi]
http://www.kidbrothers.org                http://www.fccwc.org
http://www.harvest.org/knowgod/index.htm

-----------== Posted via the PFCGuide Web Newsreader ==----------
http://www.pfcguide.com/_newsgroups/group_list.asp
0
Bruce
7/26/1999 5:31:39 PM
Reply:

Similar Artilces:

PowerBuilder API-Call Problem
I have a PowerBuilder application running under PB 6.5 and Win NT. I am running a WinAPI function, GetWindowsDirectory. It is initialized by the following declaration: Function long GetWindowsDirectory(String lpBuffer, Long nSize) LIBRARY "kernel32.DLL" Alias For "GetWindowsDirectoryA" In a window function I make a call to GetWindowsDirectory like this: string sWinDir long lReturn long iSysPath lSysPath = 256 sWinDir = space(lSysPath) lReturn = GetWindowsDirectory(sWinDir, lSysPath) lReturn returns 8, but sWinDir is empty. The code works in Visual...

Problem Calling Store Procedure from Powerbuilder in PB/Jaguar architechture
----- Original Message ----- From: Naimesh Trivedi <naimesh@rajmicro.com> Newsgroups: sybase.public.easerver.powerbuilder Sent: Wednesday, August 15, 2001 3:13 PM Subject: Re: Calling Stored Procudure in 3-tier in Powerbuilder/JaguarCTS architechture > Hello Mark, > > Thanx for ur prompt response. Foll. error is coming > > Error ORA-24321 (Zero Iteration count) If done using sqlca syntax shown > below & Stored Procedure does not > execute or no row returns (the test sp inserts one row in one table - hard > coded for testing purpose) > &...

API Calls from PowerBuilder.
Hi all, I have a problem with API calls. I'd like to now how to call api functions in a DLL that have some functions with parameters like this: DLL: function x ( stru_a ) Structure stru_a { char * name, integer * value_1, Double * value_2, .... } I hope somebody can help me. Thank's. Luiz Paes. Search the Help file for Declaring External Functions and then Calling External Functions. This will explain how (and where) to declare and call your API functions. Zane Knight. ...

Better to use API fn call/Powerbuilder fn call ...
I have a rather elementary question. Is there any difference in application performance if I use an API call rather than a PowerBuilder function call ? eg Suppose there is PowerBuilder function 'X' which will bring a window to the foreground. An API function 'Y' does the same. Assuming that I need not prepare/initialize any structure etc to be passed to the API function 'Y', does it make any difference to the app performance if I make an API call instead of the PowerBuilder function call 'X' ? Thx Ganesh The difference would be virtually i...

PB 11.5.1 (4011)
Hello Everyone, I am getting a strange error when calling a C# Web Service in PB 11.5.1 (4011). System.OutOfMemoryException When my application starts, I do the following: application global variable n_uploaded_files gnv_uploaded_files open event of application gnv_uploaded_files = CREATE n_uploaded_files n_uploaded_files instance variable s2010_upload_web_service iproxy_webservice SoapConnection iSOAP_connection constructor event of n_uploaded_files isoap_connection = CREATE SoapConnection of_instantiateservice(iproxy_webservice, "s201...

Powerbuilder
Does anybody have a cross reference list of the PowerBuilder powerscript to obsolete windows API calls?? Has anybody created new functions to handle the new windows API calls?? Thanks, Denise ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp ...

How to call MSMQ API from Powerbuilder
Hi all, can someone point me to a site/newsgroup, etc. that explains/shows how to get Powerbuilder to communicate with MSMQ? I am working in a legacy App that now requires to send messages to a MSMQ queue. Any help very appreciated! Don't know about MSMQ, but here's one for MQSeries: http://www.rgagnon.com/howto.html Click on PowerBuilder --> What's New --> Use MQSeriers HTH Greg <Gabriel Gutierrez> wrote in message news:3fa7c6b2.653e.846930886@sybase.com... > Hi all, > > can someone point me to a site/newsgroup, etc. that > e...

PowerBuilder called from Web Page
I open a PB App from a link on a web page (using the ActiveXControl)...that was successful when the user double clicks on a row, I want to open another Browser instance and pass it args.....when done...let the calling window know...and then return to the original Web Page...(all the while interwacting with a Data Base) I realize this is a broad question but...what do I need to use/do/consider/have....etc. ~~~~~~~~~~~~~~~~ J. Christopher McCauley PDMS General Physics Corporation (925) 363 9672 (Fax) (925) 363 9669 jc_mccauley@mindspring.com On Fri, 7 Dec ...

PowerBuilder Web PB and JAWS
I hope someone can help me with this. I am trying to do a sample JAWS application. I downloaded a document working with jaws I went threw all the steps of adding Jaws70.jar files then installed servlet it told me to do. did the installed pakages on JagWebPB. All this work fine but when I typed in the url http://localhost:8080/servlet/Jaws I get a 404 page cannot be found. If anybody has any suggestions I would greatly appreciate them. Thanks (EAServer Newbie) Do you have a listener configured for port 8080 on localhost? Can you see the Jaguar doc when you go to just http://loc...

Problems calling Excel from Powerbuilder
I have an application that reads data from an excel spreadsheet, then process the data and sends it to a Unix server. When the app is finished processing the data, it is supposed to update the error worksheet in the spreadsheet with an errors. If there are no errors, it will just put the date it was processed. The problem is, when it goes to update the errors worksheet, it gives a Powerbuilder runtime error and the application terminates. Here is the error message: Application Terminated. Error: Error calling external object function worksheets at line 15 in fun...

PowerBuilder calling MTS GetObjectContext Problems
I am using PowerBuilder 6.0 to build NVO�s which I am deploying as components in Microsoft Transaction Server. I am able to deploy basic components, but I am having some trouble calling the �global� GetObjectContext() function out of mtxas.dll. This call is obviously necessary as the first step to being able to take advantage of the major features of MTS transactions. I have also tried calling the GetObjectContext() from mtxex.dll (where it seems to be an exposed interface) with no luck. Here�s what I AM doing which I know is not right, but gets me some limited functionality w...

Any resource on PowerBuilder webcast / training for new PowerBuilder developer (PB 8 or ...)
Hi, I wonder if you guys know any links to help a new PowerBuilder developer? I have a friend who is indeed needs to get a hands on DataWindow to maintain several existing reports in PB 8 or 9. She has a .NET background but not PowerBuilder. Please let me know. Thanks. -- Eddy Soeparmin The "Getting Started" documentation/tutorial should help... http://infocenter.sybase.com/help/topic/com.sybase.dc37772_1150/html/pbgs/title.htm ....there's also analogous documentation going back to v10.0... http://sybooks.sybase.com/nav/detail.do?docset=430 ......

Problem registering dll created in Powerbuilder 8 and migrated to Powerbuilder 11
Hi, We have created a dll in Powerbuilder 8 as a com/mts application. This dll was then migrated to powerbuilder 11.1 build 8204. I am able to build the dll on my development machine and properly register the dll on my development machine on windows 7. When i deploy my dll and test application to a clean windows xp box, i am unable to register my dll using regsvr32. No error is displayed and the message box identifing that the registration was successful is never displayed. I have deployed all Powerbuilder 11 runtime using the powerbuilder runtime packager. I also deployed...

Powerbuilder 9.0 Migration from powerbuilder 7.0.3 problem
Hi all, i was trying an migrate an powerbuilder 7.0.3 application to powerbuilder 9.0(PFC BASED APPLICATION (PFC objects version PB 6.5) ) during migration i am getting this error. tcmborrower.pbl(w_cursor_check).w_cursor_check.open.2: Error C0163: The definition of referenced global variable sqlca was improperly compiled in object trcomps Did anybody faced this kind of error? Thx Ashok JPMORGAN ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp First error message which i got during the migration is : tcmappl.pb...

Web resources about - PowerBuilder API Call Problem - sybase.powerbuilder.web-pb

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
... Win32 or newer style .Net development After several years of work, Sybase is ready to deliver on the final step in its plan to move PowerBuilder ...

Jim O'Neil (@jimoneil) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Open Directory - Computers: Programming: Languages
about dmoz - dmoz blog - report abuse/spam - help the entire directory only in Programming/Languages Description Top : Computers : Programming ...

The HP Booth Staff (Goons) Owe Me an Apology
... when you might need to use it. For instance, when I was in the WinRunner world there were plugins for driving terminal emulators and powerbuilder ...

Contact Us - Sybase Inc
Thanks for visiting the 主页 section of Sybase.com. Here you will find information about Contact Us. For more information about Business Intelligence, ...

热门搜索 - 我的异常网
... 我的异常网 » 热门搜索 sdpnet2 移动【A111】其它用户原因鉴权失败,是什么意思啊 http:// 192.168.1.102:22578 本网站服务器位于美国,受美国法律保护 MiniUI js 破解 http://192.168.1.103:8080/ powerbuilder ...

Mobile app security: Always keep the back door locked
The best way to keep mobile apps safe is to secure the services they connect to.

10 Tech Skills That Will Instantly Net You A $100,000+ Salary
... that let's developers run Java applications. Java is highly popular language for writing web apps and custom enterprise apps. No. 8: PowerBuilder ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Resources last updated: 12/11/2015 5:06:09 PM