FoxPro/Visual FoxPro - AYUDA DIRECTORIO DE WINDOWS

 
Vista:

AYUDA DIRECTORIO DE WINDOWS

Publicado por DOUGLAS SANCHEZ (107 intervenciones) el 19/09/2004 18:35:13
Bien,COLEGAS mi segunda pregunta es la siquientes,

como puedo saber el directorio de windows por defecto
independientemente que este intaldo winnt o windows

de ante manos gracias
a todos
DOUGLAS SANCHEZ
NICARAGUA
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:AYUDA DIRECTORIO DE WINDOWS

Publicado por Fernando Hevia (38 intervenciones) el 19/09/2004 23:31:07
Hola douglas...

Este ejemplo lo bajé de alguna pagina de ejemplos...

Es una funcion API y funciona muy bien.. pruebala a ver como te va

ejem..

? WINDIR()

FUNCTION WINDIR

DECLARE INTEGER GetWindowsDirectory IN Win32API ;
STRING @cLocation, ;
INTEGER nSize
LOCAL cLocation, nSize

cLocation = SPACE(256)
nSize = GetWindowsDirectory(@cLocation, 256)

IF nSize > 0
*
* Got it - it's the size of the return
*
cLocation = LEFT(cLocation,nSize)
ELSE
*
* An error occurred when retrieving the value - return the null string
*
cLocation = ''
ENDIF

RETURN cLocation
ENDFUNC
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar