Defining a DOS environment variable

Defining a DOS environment variable

Postby driessen » Fri Apr 04, 2008 9: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby driessen » Fri Apr 04, 2008 1:20 pm

Antonio,

Thanks for your answer.

It's working fine.

Regards,
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 90 guests