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" )
  ? SETCURRENTDIRECTORY( cCurDir )
  ? SETCURRENTDIRECTORY( "C:" )
  ? GETCURRENTDIRECTORY()
  INKEY( 0 )
  RETURN NIL
#pragma BEGINDUMP
#include "windows.h"
#include "hbapi.h"
HB_FUNC( SETCURRENTDIRECTORY )
{
  hb_retl( SetCurrentDirectoryA( ( LPCSTR ) hb_parc( 1 ) ) );
}
HB_FUNC( GETCURRENTDIRECTORY )
{
 char szPath[ MAX_PATH ];
 if( GetCurrentDirectoryA( MAX_PATH, ( LPSTR ) szPath ) )
    hb_retc( szPath );
}
#pragma ENDDUMP
--

Brgds,
Viktor
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to