FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Defining a DOS environment variable
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Defining a DOS environment variable
Posted: Fri Apr 04, 2008 09:39 AM

Hello,

The function GETENV() is used to read a DOS environment variable in a FW-application.

But does anyone know how to define a DOS environment variable from in a FW-application ?

Thanks a lot in advance.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Defining a DOS environment variable
Posted: Fri Apr 04, 2008 11:49 AM

Michel,

From Windows API:

BOOL SetEnvironmentVariable(
LPCTSTR lpName, // address of environment variable name
LPCTSTR lpValue // address of new value for variable
);

Notice that it sets the environment variable for the current process

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Defining a DOS environment variable
Posted: Fri Apr 04, 2008 01:20 PM

Antonio,

Thanks for your answer.

It's working fine.

Regards,

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Continue the discussion