On Fri, 06 Feb 2009, Mindaugas Kavaliauskas wrote:
Hi,
[...]
> Conclusion: no SetCurrentDirectoryW() is called at all.
> GetCurrentDirectoryW() returned 6 bytes sting (i.e., "D:\PRG"). So command
> result (C:\Documents and Settings\Administrator) is printed from cmd.exe
> "cache".
Thank you v
Hi,
Perhaps we need to reverse engineer to understand how cd command
works... :) It seems it is not based on SetCurrentDirectory() function.
cmd.exe:
Command:
C:\Documents and Settings\Administrator>cd d:\prg
API call:
GetCurrentDirectoryW(DWORD:260, PWSTR:0x13f80c:"??") 0x4ad041f0
Hi,
Sorry but I have to miss sth.
Do you want to say that in this code:
...
it does not work for you but works in the Mindaugas code?
Mindaugas can you confirm it?
The results is very strange for me also. I've changed a code a little,
to indicate an errors and did much more tests. Also tried t
Here are some more results when run in M:\tests_m, while the default dir on
C: was \tests_c:--
M:\tests_m
.T.
.T.
.T.
C:\tests_c
--
C code slightly changed for MSVC:
--
FUNCTION MAIN()
LOCAL cCurDir := GETCURRENTDIRECTORY()
? cCurDir
? SETCURRENTDIRECTORY( "C:\WINDOWS" )
? SETCURRENTDIRECT
-Messaggio Originale-
Da: "Przemyslaw Czerpak"
A: "Harbour Project Main Developer List."
Data invio: venerdì 6 febbraio 2009 16.59
Oggetto: Re: [Harbour] curdir() and cross platform compatibility
Sorry but I have to miss sth.
Do you want to say that in this
On Fri, 06 Feb 2009, Enrico Maria Giordano wrote:
Hi,
>> I have different results (WinXP SP2)! SetCurrentDirectory("C:") correctly
>> sets C drive and its current directory.
> I confirm your result with *your* sample.
Sorry but I have to miss sth.
Do you want to say that in this code:
FUNCTION
-Messaggio Originale-
Da: "Mindaugas Kavaliauskas"
A: "Harbour Project Main Developer List."
Data invio: venerdì 6 febbraio 2009 13.57
Oggetto: Re: [Harbour] curdir() and cross platform compatibility
> Same result:
> E:\HARBOUR
> T.
> T.
> T.
&g
-Messaggio Originale-
Da: "Mindaugas Kavaliauskas"
A: "Harbour Project Main Developer List."
Data invio: venerdì 6 febbraio 2009 13.55
Oggetto: Re: [Harbour] curdir() and cross platform compatibility
I have different results (WinXP SP2)! SetCurrentDirectory(&qu
1. What windows version do you use.
WinXP SP2
2. What will happen if you use SETCURRENTDIRECTORY( "C:.\" )
instead of SETCURRENTDIRECTORY( "C:" )
PROC main()
TEST()
RETURN
#pragma BEGINDUMP
#include "windows.h"
HB_FUNC( TEST )
{
char szPa
> Same result:
> E:\HARBOUR
> T.
> T.
> T.
> C:\
The dot is missing again. But it was there when I pasted it. Perhaps a
problem with Outlook Express and Unicode chars.
Does Outlook "eats" also "WINDOWS" from "C:\WINDOWS" in last line?
Regards,
Mindaugas
__
Hi,
FUNCTION MAIN()
LOCAL cCurDir := GETCURRENTDIRECTORY()
? cCurDir
? SETCURRENTDIRECTORY( "C:\WINDOWS" )
? SETCURRENTDIRECTORY( cCurDir )
? SETCURRENTDIRECTORY( "C:" )
? GETCURRENTDIRECTORY()
INKEY( 0 )
RETURN NIL
#pragma BEGINDUMP
#include "windows.h"
#include "hbapi
-Messaggio Originale-
Da: "Przemyslaw Czerpak"
A: "Harbour Project Main Developer List."
Data invio: venerdì 6 febbraio 2009 12.09
Oggetto: Re: [Harbour] curdir() and cross platform compatibility
> Same result:
> E:\HARBOUR
> T.
> T.
> T.
>
On Fri, 06 Feb 2009, Enrico Maria Giordano wrote:
> Same result:
> E:\HARBOUR
> T.
> T.
> T.
> C:\
Thank you.
Last two questions.
1. What windows version do you use.
2. What will happen if you use SETCURRENTDIRECTORY( "C:.\" )
instead of SETCURRENTDIRECTORY( "C:" )
best regards,
Przemek
__
-Messaggio Originale-
Da: "Przemyslaw Czerpak"
A: "Harbour Project Main Developer List."
Data invio: venerdì 6 febbraio 2009 11.46
Oggetto: Re: [Harbour] curdir() and cross platform compatibility
Thank you for test.
BTW why leading dot (.) in missing in logi
On Fri, 06 Feb 2009, Enrico Maria Giordano wrote:
Hi,
> It seems not. The following sample:
> FUNCTION MAIN()
>LOCAL cCurDir := CURDRIVE() + ":\" + CURDIR()
>? cCurDir
>? SETCURRENTDIRECTORY( "C:\WINDOWS" )
>? SETCURRENTDIRECTORY( cCurDir )
>? SETCURRENTDIRECTORY( "C:" )
>
-Messaggio Originale-
Da: "Przemyslaw Czerpak"
A: "Harbour Project Main Developer List."
Data invio: venerdì 6 febbraio 2009 10.58
Oggetto: Re: [Harbour] curdir() and cross platform compatibility
I have a questions for Windows users.
Can we use SetCurrentD
On Fri, 06 Feb 2009, Mindaugas Kavaliauskas wrote:
Hi,
>> Question: what this code shows in windows if current directory is set
>> to some //server/path/tree/file path?
>>? curdrive()+hb_osPathSeparator()+curdir()
>
> C:\cawi32\sample\test>hbrun test14
In Linux:-
/home/baz/hash // current path in Linux
? curdrive()+hb_osPathSeparator()+curdir()
Returns:-
A/home/baz/hash
If curdrive() returned "" in Linux then there may be compatibility?
Where does "A" come from?
Barry Jackson wrote:
Sorry, my mistake - I did not test in Windows.
I j
Sorry, my mistake - I did not test in Windows.
I just found my old Clipper code in which:-
path_str = (DISKNAME())+":\"+(CURDIR())
Will test more in future! ;-)
Mindaugas Kavaliauskas wrote:
Hi,
Question: what this code shows in windows if current directory is set
to some //server/path/tree/
Hi,
Question: what this code shows in windows if current directory is set
to some //server/path/tree/file path?
? curdrive()+hb_osPathSeparator()+curdir()
C:\cawi32\sample\test>hbrun test146.prg
C\cawi32\sample\test
\\\linux\samba1
On Thu, 05 Feb 2009, Barry Jackson wrote:
Hi Barry.
> In Linux the full path is returned with the leading "/" missing, which
> breaks compatibility with Windows code.
> Path = "/"+curdir() // Linux
> Path = curdir() // Win
Have you tested it?
> Is it possible to correct this?
In
In Linux the full path is returned with the leading "/" missing, which
breaks compatibility with Windows code.
Path = "/"+curdir() // Linux
Path = curdir() // Win
Is it possible to correct this?
___
Harbour mailing list
Harbour@harbour-pr
22 matches
Mail list logo