Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Getting Windows Temp. Path from API

12 posts in Objects Last posting was on 2006-09-14 14:15:02.0Z
Smith Posted on 2006-09-10 07:23:37.0Z
Sender: 2614.4503bce2.1804289383@sybase.com
From: Smith
Newsgroups: sybase.public.powerbuilder.objects
Subject: Getting Windows Temp. Path from API
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4503bd79.2618.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Sep 2006 00:23:37 -0700
X-Trace: forums-1-dub 1157873017 10.22.241.41 (10 Sep 2006 00:23:37 -0700)
X-Original-Trace: 10 Sep 2006 00:23:37 -0700, 10.22.241.41
Lines: 20
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9044
Article PK: 736234

Hi All,

Can anyone tel me how to take windows temp. directory path?
I am using following code...

I declared below function in the global external function.

Public Function long GetTempPath (Long nBufferLength, String
lpBuffer) Library "kernel32" Alias For "GetTempPathA"


using following code to get the path name

string lstemppath
lstemppath = String(100,CharA(0))
GetTempPath(100,lstemppath)

But this code is not working

thanks in advance for any help


fisher <fisher Posted on 2006-09-10 08:05:29.0Z
From: fisher <fisher@NO_SPAM.PLEASe>
User-Agent: Thunderbird 1.5.0.5 (Windows/20060719)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Getting Windows Temp. Path from API
References: <4503bd79.2618.1681692777@sybase.com>
In-Reply-To: <4503bd79.2618.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 82-41-16-246.cable.ubr03.edin.blueyonder.co.uk
X-Original-NNTP-Posting-Host: 82-41-16-246.cable.ubr03.edin.blueyonder.co.uk
Message-ID: <4503c749@forums-1-dub>
Date: 10 Sep 2006 01:05:29 -0700
X-Trace: forums-1-dub 1157875529 82.41.16.246 (10 Sep 2006 01:05:29 -0700)
X-Original-Trace: 10 Sep 2006 01:05:29 -0700, 82-41-16-246.cable.ubr03.edin.blueyonder.co.uk
Lines: 24
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9045
Article PK: 736236

try initializing lstemppath with spaces.
Always et us know which PB version/build You are using

Smith napisaÂł(a):

> Hi All,
>
> Can anyone tel me how to take windows temp. directory path?
> I am using following code...
>
> I declared below function in the global external function.
>
> Public Function long GetTempPath (Long nBufferLength, String
> lpBuffer) Library "kernel32" Alias For "GetTempPathA"
>
>
> using following code to get the path name
>
> string lstemppath
> lstemppath = String(100,CharA(0))
> GetTempPath(100,lstemppath)
>
> But this code is not working
>
> thanks in advance for any help


Smith Posted on 2006-09-10 13:07:52.0Z
Sender: 74d8.4504046d.1804289383@sybase.com
From: Smith
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Getting Windows Temp. Path from API
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <45040e19.74ee.1681692777@sybase.com>
References: <4503c749@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 10 Sep 2006 06:07:37 -0700, 10.22.241.42
Lines: 37
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 10 Sep 2006 06:07:38 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 10 Sep 2006 06:07:52 -0700
X-Trace: forums-1-dub 1157893672 10.22.108.75 (10 Sep 2006 06:07:52 -0700)
X-Original-Trace: 10 Sep 2006 06:07:52 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9047
Article PK: 736237

Hi Fisher,

I changed my coding as you said, Still it is not working

string lstemppath
lstemppath = Space(100)
GetTempPath(100,lstemppath)

Version 10.2.1 Build 9004

Regards,
Smith

> try initializing lstemppath with spaces.
> Always et us know which PB version/build You are using
>
> Smith napisa³(a):
> > Hi All,
> >
> > Can anyone tel me how to take windows temp. directory
> > path? I am using following code...
> >
> > I declared below function in the global external
> > function.
> > Public Function long GetTempPath (Long nBufferLength,
> > String lpBuffer) Library "kernel32" Alias For
> > "GetTempPathA"
> >
> > using following code to get the path name
> >
> > string lstemppath
> > lstemppath = String(100,CharA(0))
> > GetTempPath(100,lstemppath)
> >
> > But this code is not working
> >
> > thanks in advance for any help


Smith Posted on 2006-09-10 12:25:35.0Z
Sender: 74d4.45040389.1804289383@sybase.com
From: Smith
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Getting Windows Temp. Path from API
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4504042d.74d6.1681692777@sybase.com>
References: <4503c749@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 10 Sep 2006 05:25:17 -0700, 10.22.241.42
Lines: 36
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 10 Sep 2006 05:25:20 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 10 Sep 2006 05:25:35 -0700
X-Trace: forums-1-dub 1157891135 10.22.108.75 (10 Sep 2006 05:25:35 -0700)
X-Original-Trace: 10 Sep 2006 05:25:35 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9046
Article PK: 736243

Hi Fisher,

I changed my coding as you said, Still it is not working

string lstemppath
lstemppath = Space(100)
GetTempPath(100,lstemppath)

Version 10.2.1 Build 9004

Regards

> try initializing lstemppath with spaces.
> Always et us know which PB version/build You are using
>
> Smith napisa³(a):
> > Hi All,
> >
> > Can anyone tel me how to take windows temp. directory
> > path? I am using following code...
> >
> > I declared below function in the global external
> > function.
> > Public Function long GetTempPath (Long nBufferLength,
> > String lpBuffer) Library "kernel32" Alias For
> > "GetTempPathA"
> >
> > using following code to get the path name
> >
> > string lstemppath
> > lstemppath = String(100,CharA(0))
> > GetTempPath(100,lstemppath)
> >
> > But this code is not working
> >
> > thanks in advance for any help


Bruce Armstrong [TeamSybase] Posted on 2006-09-10 14:37:13.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAMbruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Getting Windows Temp. Path from API
Organization: TeamSybase
Reply-To: NOCANSPAMbruce.armstrong@teamsybase.com
Message-ID: <dk88g2p0qmjuucoqcr4bu3m1gqc6mm8cek@4ax.com>
References: <4503c749@forums-1-dub> <4504042d.74d6.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Original-NNTP-Posting-Host: 68-190-226-38.static.lsan.ca.charter.com
X-Original-Trace: 10 Sep 2006 07:36:57 -0700, 68-190-226-38.static.lsan.ca.charter.com
Lines: 53
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 10 Sep 2006 07:36:57 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 10 Sep 2006 07:37:13 -0700
X-Trace: forums-1-dub 1157899033 10.22.108.75 (10 Sep 2006 07:37:13 -0700)
X-Original-Trace: 10 Sep 2006 07:37:13 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9049
Article PK: 736239

PB 10 is Unicode. If you're going to make an ANSI call, you need to
append ;ANSI to the back of the external function declaration:

Public Function long GetTempPath (Long nBufferLength,
String lpBuffer) Library "kernel32" Alias For
"GetTempPathA;ANSI"

Either that or use the Unicode version of the function.

Doing a Space ( 100 ) is enough to prepad the string. The Windows API
call will add the terminating null character at the correct location
(essentially truncating the string) when it returns the value.

On 10 Sep 2006 05:25:35 -0700, Smith wrote:

>Hi Fisher,
>
>I changed my coding as you said, Still it is not working
>
>string lstemppath
>lstemppath = Space(100)
>GetTempPath(100,lstemppath)
>
>Version 10.2.1 Build 9004
>
>Regards
>
>> try initializing lstemppath with spaces.
>> Always et us know which PB version/build You are using
>>
>> Smith napisa³(a):
>> > Hi All,
>> >
>> > Can anyone tel me how to take windows temp. directory
>> > path? I am using following code...
>> >
>> > I declared below function in the global external
>> > function.
>> > Public Function long GetTempPath (Long nBufferLength,
>> > String lpBuffer) Library "kernel32" Alias For
>> > "GetTempPathA"
>> >
>> > using following code to get the path name
>> >
>> > string lstemppath
>> > lstemppath = String(100,CharA(0))
>> > GetTempPath(100,lstemppath)
>> >
>> > But this code is not working
>> >
>> > thanks in advance for any help


Smith Posted on 2006-09-11 06:07:06.0Z
Sender: 5652.4504f7b1.1804289383@sybase.com
From: Smith
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Getting Windows Temp. Path from API
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4504fd0a.5688.1681692777@sybase.com>
References: <dk88g2p0qmjuucoqcr4bu3m1gqc6mm8cek@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Sep 2006 23:07:06 -0700
X-Trace: forums-1-dub 1157954826 10.22.241.41 (10 Sep 2006 23:07:06 -0700)
X-Original-Trace: 10 Sep 2006 23:07:06 -0700, 10.22.241.41
Lines: 67
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9050
Article PK: 736241

Hi Bruce,

Function uint GetTempPathW (uint nBufferLength, Ref String
lpBuffer) Library "kernel32.dll"

I used this syntax and it is working fine.

Thanks for your help.

Regards,

Smith

> PB 10 is Unicode. If you're going to make an ANSI call,
> you need to append ;ANSI to the back of the external
> function declaration:
>
> Public Function long GetTempPath (Long nBufferLength,
> String lpBuffer) Library "kernel32" Alias For
> "GetTempPathA;ANSI"
>
> Either that or use the Unicode version of the function.
>
> Doing a Space ( 100 ) is enough to prepad the string. The
> Windows API call will add the terminating null character
> at the correct location (essentially truncating the
> string) when it returns the value.
>
> On 10 Sep 2006 05:25:35 -0700, Smith wrote:
>
> >Hi Fisher,
> >
> >I changed my coding as you said, Still it is not working
> >
> >string lstemppath
> >lstemppath = Space(100)
> >GetTempPath(100,lstemppath)
> >
> >Version 10.2.1 Build 9004
> >
> >Regards
> >
> >> try initializing lstemppath with spaces.
> >> Always et us know which PB version/build You are using
> >>
> >> Smith napisa³(a):
> >> > Hi All,
> >> >
> >> > Can anyone tel me how to take windows temp. directory
> >> > path? I am using following code...
> >> >
> >> > I declared below function in the global external
> >> > function.
> >> > Public Function long GetTempPath (Long nBufferLength,
> >> > String lpBuffer) Library "kernel32" Alias For
> >> > "GetTempPathA"
> >> >
> >> > using following code to get the path name
> >> >
> >> > string lstemppath
> >> > lstemppath = String(100,CharA(0))
> >> > GetTempPath(100,lstemppath)
> >> >
> >> > But this code is not working
> >> >
> >> > thanks in advance for any help
>


Jason 'Bug' Fenter [TeamSybase] Posted on 2006-09-10 13:50:36.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com>
User-Agent: Thunderbird 1.5.0.5 (Windows/20060719)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Getting Windows Temp. Path from API
References: <4503bd79.2618.1681692777@sybase.com>
In-Reply-To: <4503bd79.2618.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: adsl-75-40-27-231.dsl.rcsntx.sbcglobal.net
Message-ID: <4504181a@forums-2-dub>
X-Original-Trace: 10 Sep 2006 06:50:18 -0700, adsl-75-40-27-231.dsl.rcsntx.sbcglobal.net
Lines: 26
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 10 Sep 2006 06:50:21 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 10 Sep 2006 06:50:36 -0700
X-Trace: forums-1-dub 1157896236 10.22.108.75 (10 Sep 2006 06:50:36 -0700)
X-Original-Trace: 10 Sep 2006 06:50:36 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9048
Article PK: 736238


Smith wrote:
> Hi All,
>
> Can anyone tel me how to take windows temp. directory path?
> I am using following code...
>
> I declared below function in the global external function.
>
> Public Function long GetTempPath (Long nBufferLength, String
> lpBuffer) Library "kernel32" Alias For "GetTempPathA"
>
>
> using following code to get the path name
>
> string lstemppath
> lstemppath = String(100,CharA(0))
> GetTempPath(100,lstemppath)
>
> But this code is not working
>
> thanks in advance for any help

Can you define "not working"? Does it return gibberish? What's the
return code? (You might need to call GetLastError() and FormatMessage()
to get something meaningful from the OS. I'm almost to the point of
believing that any API call should be followed with these two API calls.)


Timothy Madsen Posted on 2006-09-12 03:58:56.0Z
From: "Timothy Madsen" <timothy_madsen@bigfoot.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <4503bd79.2618.1681692777@sybase.com> <4504181a@forums-2-dub>
Subject: Re: Getting Windows Temp. Path from API
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: c-68-34-250-215.hsd1.pa.comcast.net
X-Original-NNTP-Posting-Host: c-68-34-250-215.hsd1.pa.comcast.net
Message-ID: <45063080@forums-1-dub>
Date: 11 Sep 2006 20:58:56 -0700
X-Trace: forums-1-dub 1158033536 68.34.250.215 (11 Sep 2006 20:58:56 -0700)
X-Original-Trace: 11 Sep 2006 20:58:56 -0700, c-68-34-250-215.hsd1.pa.comcast.net
X-Authenticated-User: pb110beta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9053
Article PK: 736242

Wondering why "... almost to the point ..." ? Wouldn't this be considered
just as standard as checking the SQLCA.SQLCode after each SQL statement?
Tim.

"Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com> wrote in
message news:4504181a@forums-2-dub...
> Smith wrote:
>> Hi All,
>>
>> Can anyone tel me how to take windows temp. directory path?
>> I am using following code...
>>
>> I declared below function in the global external function.
>>
>> Public Function long GetTempPath (Long nBufferLength, String
>> lpBuffer) Library "kernel32" Alias For "GetTempPathA"
>>
>>
>> using following code to get the path name
>>
>> string lstemppath
>> lstemppath = String(100,CharA(0))
>> GetTempPath(100,lstemppath)
>>
>> But this code is not working
>>
>> thanks in advance for any help
>
> Can you define "not working"? Does it return gibberish? What's the return
> code? (You might need to call GetLastError() and FormatMessage() to get
> something meaningful from the OS. I'm almost to the point of believing
> that any API call should be followed with these two API calls.)


Chris Pollach Posted on 2006-09-12 12:51:23.0Z
From: "Chris Pollach" <cpollach@travel-net.dot.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <4503bd79.2618.1681692777@sybase.com> <4504181a@forums-2-dub>
Subject: Re: Getting Windows Temp. Path from API
Lines: 43
Organization: STD Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4927.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200
X-Original-NNTP-Posting-Host: stealth.nserc.ca
Message-ID: <4506ad33$1@forums-2-dub>
X-Original-Trace: 12 Sep 2006 05:50:59 -0700, stealth.nserc.ca
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 12 Sep 2006 05:51:00 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 12 Sep 2006 05:51:23 -0700
X-Trace: forums-1-dub 1158065483 10.22.108.75 (12 Sep 2006 05:51:23 -0700)
X-Original-Trace: 12 Sep 2006 05:51:23 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9054
Article PK: 736244

Jason;

As he is using PB 10.2.1 .. it should be:


Function long GetTempPath (ULong nBufferLength, Ref String lpBuffer) Library
"kernel32" Alias For "GetTempPathW"

Regards ... Chris

"Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com> wrote in
message news:4504181a@forums-2-dub...
> Smith wrote:
> > Hi All,
> >
> > Can anyone tel me how to take windows temp. directory path?
> > I am using following code...
> >
> > I declared below function in the global external function.
> >
> > Public Function long GetTempPath (Long nBufferLength, String
> > lpBuffer) Library "kernel32" Alias For "GetTempPathA"
> >
> >
> > using following code to get the path name
> >
> > string lstemppath
> > lstemppath = String(100,CharA(0))
> > GetTempPath(100,lstemppath)
> >
> > But this code is not working
> >
> > thanks in advance for any help
>
> Can you define "not working"? Does it return gibberish? What's the
> return code? (You might need to call GetLastError() and FormatMessage()
> to get something meaningful from the OS. I'm almost to the point of
> believing that any API call should be followed with these two API calls.)


Smith Posted on 2006-09-13 06:03:02.0Z
Sender: 74bd.45079ef3.1804289383@sybase.com
From: Smith
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Getting Windows Temp. Path from API
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <45079f16.74bf.1681692777@sybase.com>
References: <4506ad33$1@forums-2-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 12 Sep 2006 23:03:02 -0700
X-Trace: forums-1-dub 1158127382 10.22.241.41 (12 Sep 2006 23:03:02 -0700)
X-Original-Trace: 12 Sep 2006 23:03:02 -0700, 10.22.241.41
Lines: 51
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9057
Article PK: 736250

Hi Chris,

How can we findout these kind of things?.

Smith

> Jason;
>
> As he is using PB 10.2.1 .. it should be:
>
>
> Function long GetTempPath (ULong nBufferLength, Ref String
> lpBuffer) Library "kernel32" Alias For "GetTempPathW"
>
> Regards ... Chris
>
>
>
>
> "Jason 'Bug' Fenter [TeamSybase]"
> <jason.fenter@teamsybase.com> wrote in message
> > news:4504181a@forums-2-dub... Smith wrote:
> > > Hi All,
> > >
> > > Can anyone tel me how to take windows temp. directory
> > > path? I am using following code...
> > >
> > > I declared below function in the global external
> > function. >
> > > Public Function long GetTempPath (Long nBufferLength,
> > > String lpBuffer) Library "kernel32" Alias For
> > "GetTempPathA" >
> > >
> > > using following code to get the path name
> > >
> > > string lstemppath
> > > lstemppath = String(100,CharA(0))
> > > GetTempPath(100,lstemppath)
> > >
> > > But this code is not working
> > >
> > > thanks in advance for any help
> >
> > Can you define "not working"? Does it return gibberish?
> > What's the return code? (You might need to call
> > GetLastError() and FormatMessage() to get something
> > meaningful from the OS. I'm almost to the point of
> believing that any API call should be followed with these
> two API calls.)
>
>


Chris Pollach Posted on 2006-09-14 14:15:02.0Z
From: "Chris Pollach" <cpollach@travel-net.dot.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <4506ad33$1@forums-2-dub> <45079f16.74bf.1681692777@sybase.com>
Subject: Re: Getting Windows Temp. Path from API
Lines: 61
Organization: STD Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4927.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200
NNTP-Posting-Host: stealth.nserc.ca
X-Original-NNTP-Posting-Host: stealth.nserc.ca
Message-ID: <450963e6$1@forums-1-dub>
Date: 14 Sep 2006 07:15:02 -0700
X-Trace: forums-1-dub 1158243302 198.96.2.93 (14 Sep 2006 07:15:02 -0700)
X-Original-Trace: 14 Sep 2006 07:15:02 -0700, stealth.nserc.ca
X-Authenticated-User: pb105beta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9059
Article PK: 736246

Check this out: http://www.sybase.com/detail?id=44648, then lookup the
required API calls on MSDN.

HTH ... Chris

<Smith> wrote in message news:45079f16.74bf.1681692777@sybase.com...
> Hi Chris,
>
> How can we findout these kind of things?.
>
> Smith
>
> > Jason;
> >
> > As he is using PB 10.2.1 .. it should be:
> >
> >
> > Function long GetTempPath (ULong nBufferLength, Ref String
> > lpBuffer) Library "kernel32" Alias For "GetTempPathW"
> >
> > Regards ... Chris
> >
> >
> >
> >
> > "Jason 'Bug' Fenter [TeamSybase]"
> > <jason.fenter@teamsybase.com> wrote in message
> > > news:4504181a@forums-2-dub... Smith wrote:
> > > > Hi All,
> > > >
> > > > Can anyone tel me how to take windows temp. directory
> > > > path? I am using following code...
> > > >
> > > > I declared below function in the global external
> > > function. >
> > > > Public Function long GetTempPath (Long nBufferLength,
> > > > String lpBuffer) Library "kernel32" Alias For
> > > "GetTempPathA" >
> > > >
> > > > using following code to get the path name
> > > >
> > > > string lstemppath
> > > > lstemppath = String(100,CharA(0))
> > > > GetTempPath(100,lstemppath)
> > > >
> > > > But this code is not working
> > > >
> > > > thanks in advance for any help
> > >
> > > Can you define "not working"? Does it return gibberish?
> > > What's the return code? (You might need to call
> > > GetLastError() and FormatMessage() to get something
> > > meaningful from the OS. I'm almost to the point of
> > believing that any API call should be followed with these
> > two API calls.)
> >
> >


fisher <fisher Posted on 2006-09-13 19:27:53.0Z
From: fisher <fisher@NO_SPAM.PLEASe>
User-Agent: Thunderbird 1.5.0.5 (Windows/20060719)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Getting Windows Temp. Path from API
References: <4506ad33$1@forums-2-dub> <45079f16.74bf.1681692777@sybase.com>
In-Reply-To: <45079f16.74bf.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 82-41-16-246.cable.ubr03.edin.blueyonder.co.uk
X-Original-NNTP-Posting-Host: 82-41-16-246.cable.ubr03.edin.blueyonder.co.uk
Message-ID: <45085bb9$1@forums-1-dub>
Date: 13 Sep 2006 12:27:53 -0700
X-Trace: forums-1-dub 1158175673 82.41.16.246 (13 Sep 2006 12:27:53 -0700)
X-Original-Trace: 13 Sep 2006 12:27:53 -0700, 82-41-16-246.cable.ubr03.edin.blueyonder.co.uk
Lines: 58
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9058
Article PK: 736248

Check PB help for
Calling external functions

If You have experience with pre - 10 PB version, You should check
chapter "Welcome to PowerbBuilder"
Good luck


Smith napisaÂł(a):

> Hi Chris,
>
> How can we findout these kind of things?.
>
> Smith
>
>> Jason;
>>
>> As he is using PB 10.2.1 .. it should be:
>>
>>
>> Function long GetTempPath (ULong nBufferLength, Ref String
>> lpBuffer) Library "kernel32" Alias For "GetTempPathW"
>>
>> Regards ... Chris
>>
>>
>>
>>
>> "Jason 'Bug' Fenter [TeamSybase]"
>> <jason.fenter@teamsybase.com> wrote in message
>>> news:4504181a@forums-2-dub... Smith wrote:
>>>> Hi All,
>>>>
>>>> Can anyone tel me how to take windows temp. directory
>>>> path? I am using following code...
>>>>
>>>> I declared below function in the global external
>>> function. >
>>>> Public Function long GetTempPath (Long nBufferLength,
>>>> String lpBuffer) Library "kernel32" Alias For
>>> "GetTempPathA" >
>>>> using following code to get the path name
>>>>
>>>> string lstemppath
>>>> lstemppath = String(100,CharA(0))
>>>> GetTempPath(100,lstemppath)
>>>>
>>>> But this code is not working
>>>>
>>>> thanks in advance for any help
>>> Can you define "not working"? Does it return gibberish?
>>> What's the return code? (You might need to call
>>> GetLastError() and FormatMessage() to get something
>>> meaningful from the OS. I'm almost to the point of
>> believing that any API call should be followed with these
>> two API calls.)
>>
>>