CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Setting Env Variables

    I'm looking for a way to set DOS environment variables from C++. I've tried "_putevn" but found it's only good for the program thread environment.






  2. #2
    Join Date
    May 1999
    Location
    Antwerp, Belgium
    Posts
    136

    Re: Setting Env Variables

    You can use this API function :

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



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured