windows_programming_notes.nbk: Home | Index | Next Page: SetFileAttributes | Previous Page: SetDlgItemText


 SetEnvironmentVariable

Sets the contents of the specified environment variable for the current process.

Snytax

    BOOL WINAPI SetEnvironmentVariable(
      __in      LPCTSTR lpName,
      __in_opt  LPCTSTR lpValue
    );

Parameters

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

This function has no effect on the system environment variables or the environment variables of other processes.

Requirements


windows_programming_notes.nbk: Home | Index | Next Page: SetFileAttributes | Previous Page: SetDlgItemText


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time