RE: SetEnvironmentVariable in Debug and Release cofiguratin



Actually, it was:

// Import the Kernel32 dll file.
[DllImport("kernel32.dll",CharSet=CharSet.Auto, SetLastError=true)]

[return:MarshalAs(UnmanagedType.Bool)]

// The declaration is similar to the SDK function.
public static extern bool SetEnvironmentVariable(string lpName, string
lpValue);

This is the Set one.
BTW, it is taken from
http://support.microsoft.com/default.aspx?scid=kb;en-us;829145



--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
.



Relevant Pages

  • Re: how can i add environment variable to my VS.NET 2003 project ?
    ... static extern bool SetEnvironmentVariable(string lpName, string lpValue); ... y> my application use environment variable, let call it FOO. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to open cash drawer through receipt printer in c#?
    ... public class DOCINFOA ... public string pOutputFile; ... public static extern bool OpenPrinter ... bSuccess = WritePrinter; ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: How to print a spool file.
    ... public static extern bool OpenPrinterstring szPrinter, out IntPtr hPrinter, ... bool bSuccess = false; // Assume failure unless you specifically succeed. ...
    (microsoft.public.vstudio.development)
  • Re: FTP CD command
    ... public const int GENERIC_WRITE = 0x40000000; ... string lpszProxyName, ... public static extern IntPtr InternetConnect ( ... public static extern bool FtpGetCurrentDirectory ( ...
    (microsoft.public.dotnet.languages.vb)
  • Verify a Windows Account
    ... static bool authUserLocal(string username, string password) ... public static extern bool LogonUser(string lpszUsername, ... int dwLogonType, int dwLogonProvider, out int phToken); ...
    (microsoft.public.dotnet.framework)